Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update logrotate file permissions #3

Open
wants to merge 19 commits into
base: dev
Choose a base branch
from

Conversation

greyvugrin
Copy link
Contributor

This fixes 2 things:

  1. Nginx has a bug where initial access.log and error.log files are owner by root (master process user) until they have been written to
  2. create 0640 www-data www-data will create new files but the rotated ones are owned by root since that ran the process, unless you chown

Another option was to add su www-data www-data in here, but then it had issues rotating files, bc of the above :/.

Chowning in postrotate is the move, checks the boxes and keeps ownership as expected.

@amurrell amurrell changed the base branch from main to dev February 29, 2024 13:29
@amurrell amurrell changed the base branch from dev to main February 29, 2024 13:29
@amurrell amurrell changed the base branch from main to dev February 29, 2024 13:29
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.

2 participants