linux - /var/log/folder permissions change automatically everyday -


i on ubuntu machine , writing log folder /var/log/app through cron.daily. log folder owned app user , needs permissions set 755 job done. had set permissions of folder 755 again , again after finding permissions being automatically changed 700.

what can possible causes kind of behavior?

content of cron.daily:

00 22 * * 1-5 app app arg > /var/log/app/app.$(date +"\%y-\%m-\%d").log 2 35 13 * * 2-7 app app arg > /var/log/app/app.$(date +"\%y-\%m-\%d").log 2 

not 100% sure, guess have logrotate rule set folder. if it's common application apache or mysql, , you're running common linux distro, likely.

depending on distro, should have either file /etc/logrotate.conf, or directory /etc/logrotate.d/ 1 file per service, or both.

check these files if there rules directory in question. if need directory owned different user, can use create directive of logrotate (or modify it, if exists).

but make sure original service writing logs still able so.


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

jsf - How to ajax update an item in the footer of a PrimeFaces dataTable? -

django - CSRF verification failed. Request aborted. CSRF cookie not set -