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.

For years I used MAMP on my Macintosh computer to run a development environment with Apache, MySQL, and PHP. When I upgraded my machine to OS 10.7, I decided to use OS 10's native Apache and PHP in lieu of downloading MAMP again, mostly following the instructions I found here.

Since then, I’ve only had one problem that I never experienced with MAMP: My CMS doesn’t recognize that certain files and images directories are writable, even though their permissions are set to drwxr-xr-x, and the same directories are writable when I deploy them on the Web.

On my local machine, my CMS gives me this error message:

Image directory is not writable: /Users/me/Sites/example.com/images
File directory path is not writable: /Users/me/Sites/example.com/files
Temporary directory path is not writable: /Users/me/Sites/example.com/cms/tmp

When I copy the exact same files and directories to my publish server, it works fine. It also worked fine on my development machine when I used MAMP. These errors only cropped up after I began using OS 10.7's native PHP instead of MAMP. Since it works on my publish servers, I'd rather fix this by correcting my Apache and PHP configuration (if possible) than by changing the file permissions.

Is there an easy way to do this?

share|improve this question

1 Answer 1

When you are copying the files you are probably and administartor. When PHP copies the files, it is probably using the Apache account. Check your permissions to make sure Apache has access to the the three locations in which it cant write to.

Also, if Apache isn't the owner of the folder, the current permissions drwxr-xr-x would not work since Apache isn't the owner.

share|improve this answer
    
Thanks, ponsfonze. Is it feasible to make Apache the owner of everything in my /User/username/Sites directory? And if so, would it cause problems elsewhere? –  John Stephens Dec 19 '12 at 21:27
    
@JohnStephens Use the command chown to change the owner of a directory. Refer to the documentation on how to use it. –  ponsfonze Dec 20 '12 at 5:23

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.