Skip to content

logging: Add regression coverage for rotated file mode#7620

Open
steadytao wants to merge 1 commit intocaddyserver:masterfrom
steadytao:test/logging-rotation-mode-regression
Open

logging: Add regression coverage for rotated file mode#7620
steadytao wants to merge 1 commit intocaddyserver:masterfrom
steadytao:test/logging-rotation-mode-regression

Conversation

@steadytao
Copy link
Copy Markdown
Contributor

Adds Caddy-side regression coverage for the log rotation mode issue addressed by the timberjack bump in #7618.

Why

Issue #7613 reported that after log rotation, the new active log file could lose permissions configured via mode because the process umask still masked bits during rotation-time file creation.

The behavioral fix belongs in github.com/DeRuina/timberjack and was brought into Caddy by #7618, which bumps timberjack to v1.4.1.

This PR does not change Caddy runtime behavior. It adds regression coverage to ensure Caddy’s integration continues to preserve the configured file mode across rotation under a nonzero umask.

What this tests

The new test exercises the user-facing behavior from #7613:

  • umask set to 0022
  • rolling file logs enabled
  • configured file mode 0660
  • rotation triggered
  • asserts that the new active log file still has mode 0660

Related

Assistance Disclosure

No AI was used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant