Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I just migrated my website (built on CakePHP) from Media Temple's (gs) server to (dv). I got an error that the /tmp/cache folder is not writable. Changing the permissions to 777 fixes this error - however it seems unsafe (is this true?). On the (gs) I didn't have to give write access to "Everyone". So it seems the webserver is neither the user or belongs to the group.

How come the server can't write to the cache file and how can I make it so that the web server can write to the tmp folder without setting permissions to 777?

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

Before changing too much around, why not ask their tech support directly? They may have a suggestion that will save you from possibly changing ownership or making things world writable.

A Google search came up with a related issue where you had to have /tmp/cache created by the user for the domain vs creating it as root.

share|improve this answer
    
Do you mind pasting the link you found? I'll ask MT as well, I was just hoping SF would be faster :) –  828 Feb 1 '10 at 1:11
    
I think this is what I found before, although it is not specific to CakePHP: drupal.org/node/169840 but note "As a result, you can't even fix the problem yourself without the assistance of the webhost provider." That's why I figured it might be best to check with them first. –  Dave Feb 1 '10 at 10:38
    
Did you ever figure this out? –  Dave Feb 13 '10 at 5:46
    
Yes, they got back to me: (1) Connect to your server as the root user and open up /etc/group in a text editor. (2) Find the line that appears similar to: psacln:x:2523: (3) Add the following groups (do not change the groupID number): psacln:x:2523:apache,psaftp,psaadm (4) Grant group write access to any folders (5) Restart the apache service. –  828 Feb 14 '10 at 4:35
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.