Skip to content

Instantly share code, notes, and snippets.

@u007 u007/web
Last active Jul 9, 2018

Embed
What would you like to do?
logrotate configuration example
# /etc/logrotate.d/web
# me = my username
# with max of 10MB
/home/me/web/log/production.log {
size 10M
copytruncate
create 0666 me
compress
rotate 4
missingok
}
# To test
# sudo logrotate /etc/logrotate.d/web
# use -f flag to force run (even if size is below 10MB)
# ensure /home/me/web/log (parent directory) does not have group+other writable: chmod go-w log
# also log/production.log must be owned by "me"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.