The thing originated from such a scene:
nginx
Run as user_www
, the permissions of log filesaccess.log
and so on are:
_www _www rw------ -
And I now need to let another user read the file, so I want to be able to specify the permissions of the log file. After searching, I didn't find thatnginx
provides this configuration, and I was very confused.
Please give me some advice.
Don’t use the chmod command to modify file permissions? This way other users can read it.
cat /etc/logrotate.d/nginx
/var/log/nginx/*.log {
}
Change the log rolling configuration