Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've run chmod 777 on /home/cache/, however the apache user is still unable to write to it. My php script is writing to this directory but got a permission denied error and don't know why.

ls -ld cache shows:

drwxrwxrwx. 2 root root 69632 Aug 24 17:04 cache/

ls -ld /home shows:

drwxr-xr-x. 19 root root 4096 Aug 24 18:30 /home

share|improve this question
Also post the error log here? – quanta Aug 25 '12 at 9:21
And what is the exact error message that the php function returns? – Iain Aug 25 '12 at 9:48

Change the owner permission of the /home/cache/ to "apache user" by running the command:

chown apache /home/cache/

After that ensure selinux is turned off in your system. You can run setenforce 0 to turn selinux off.

share|improve this answer

Your Answer


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.