losing correct permissions
#!/bin/sh
GIT_WORK_TREE=/srv/www/myapp.com/public_html git checkout -f
I have been working on setting up about 4 different cron jobs. While doing this I updated my crontab on the server. Since beginning this work I am randomly (I can't figure out what the cause is) having my cache file permissions changed so they are not writable. This causes obvious error problems.
The error messages:
SplFileInfo::openFile(/srv/www/myapp.com/public_html/app/tmp/cache/models/cake_model_default_summer_list): failed to open stream: Permission denied [CORE/Cake/Cache/Engine/FileEngine.php, line 297]
Warning(512)SplFileInfo::openFile(/srv/www/myapp.com/public_html/app/tmp/cache/models/cake_model_default_summer_list) [http://php.net/splfileinfo.openfile]: failed to open stream: Permission denied [CORE/Cake/Cache/Engine/FileEngine.php, line 297]
The permissions are being changed from rwxrwxrwx to rw-r–r--. All files are owned by root.
My crontab currently is:
@daily /srv/www/myapp.com/public_html/lib/Cake/Console/cake -app /srv/www/myapp.com/public_html/app updateSchedule
28,58 * * * * /srv/www/myapp.com/public_html/lib/Cake/Console/cake -app /srv/www/myapp.com/public_html/app checkMiss
*/30 * * * * /srv/www/myapp.com/public_html/lib/Cake/Console/cake -app /srv/www/myapp.com/public_html/app reminder
Any ideas why the permissions are getting changed, or what I can do to make the system work better? I'm a bit new to server administration…so feel free to make suggestions for me!
Thanks for any help!