losing correct permissions

I am running a cakePHP application on Ubuntu 10.04. I do the development on my local machine and push to a bare repository hosted on my linode. A post-receive hook then checks out the master branch to my published directory using:

#!/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!

0 Replies

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct