You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just wanted to mention I had a few issues with the logrotate config out of the box.
I noticed my logs wern't being rotated so I ran logrotate -d -f on the config file.
First I got an error about the ownership being wrong.
deploy@myhost://var/www/my_app/shared/config$ sudo logrotate -d -f /etc/logrotate.d/my_app_production
Ignoring /etc/logrotate.d/my_app_production because the file owner is wrong (should be root).
Handling 0 logs
So I fixed that, then get errors that the parent directory is also incorrect.
deploy@myhost://var/www/my_app/shared/config$ sudo chown root:root log_rotation
deploy@myhost://var/www/my_app/shared/config$ sudo logrotate -d -f /etc/logrotate.d/my_app_production
reading config file /etc/logrotate.d/my_app_production
error: /etc/logrotate.d/my_app_production:9 unknown option 'endscript' -- ignoring line
Handling 1 logs
rotating pattern: /var/www/my_app/shared/log/*.log forced from command line (52 rotations)
empty log files are not rotated, old logs are removed
considering log /var/www/my_app/shared/log/cron.log
error: skipping "/var/www/my_app/shared/log/cron.log" because parent directory has insecure permissions (It's world writable or writable by group which is
not "root") Set "su" directive in config file to tell logrotate which user/group should be used for rotation.
considering log /var/www/my_app/shared/log/ember-frontend.production.log
error: skipping "/var/www/my_app/shared/log/ember-frontend.production.log" because parent directory has insecure permissions (It's world writable or writa
ble by group which is not "root") Set "su" directive in config file to tell logrotate which user/group should be used for rotation.
considering log /var/www/my_app/shared/log/production.log
error: skipping "/var/www/my_app/shared/log/production.log" because parent directory has insecure permissions (It's world writable or writable by group wh
ich is not "root") Set "su" directive in config file to tell logrotate which user/group should be used for rotation.
considering log /var/www/my_app/shared/log/sidekiq.log
error: skipping "/var/www/my_app/shared/log/sidekiq.log" because parent directory has insecure permissions (It's world writable or writable by group which
is not "root") Set "su" directive in config file to tell logrotate which user/group should be used for rotation.
considering log /var/www/my_app/shared/log/unicorn.log
error: skipping "/var/www/my_app/shared/log/unicorn.log" because parent directory has insecure permissions (It's world writable or writable by group which
is not "root") Set "su" directive in config file to tell logrotate which user/group should be used for rotation.
I gave the su option a shot, and my logs are rotated now.
su deploy deploy
Not sure what a fix should look like, either set the owner to root in setup_config or somehow set the su option globally.
The text was updated successfully, but these errors were encountered:
I just wanted to mention I had a few issues with the logrotate config out of the box.
I noticed my logs wern't being rotated so I ran logrotate -d -f on the config file.
First I got an error about the ownership being wrong.
So I fixed that, then get errors that the parent directory is also incorrect.
I gave the su option a shot, and my logs are rotated now.
Not sure what a fix should look like, either set the owner to root in
setup_config
or somehow set thesu
option globally.The text was updated successfully, but these errors were encountered: