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 am not very familiar with CentOS and its specific permissions issues with httpd+php environment so that I got stuck with "failed to open stream: Permission denied" after installing website on production server.

I have directory layout like that

/usr/local/project ... /usr/local/project/../../public

/var/www/html -> /usr/local/project/../../public ^ symlink

Script tries to write to project's sub directory and gets permission denied error.

I have tried

1) set 744 permissions for this folder 2) set 777 for entire project's tree 3) set open_basedir to /usr/local/project in combination with previous permissions changing

Nothing helped.

What can cause permissions error?

share|improve this question
up vote 1 down vote accepted

Check if you have SELinux enabled? If yes then disable it

share|improve this answer
thx, it solved problem – duganets Feb 11 '11 at 13:33

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.