Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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 have one domain hosted on server, there are about 20 subdomains as addon domains there. For no good reason someone has changed (chgrp) on all files in directory to user now all websites are showing 403 forbidden access error. What should i do now to resume websites. I have tried changing php handler but no luck yet :/ php5 handler is suphp and Apache suEXEC is on....

share|improve this question

That looks your file permission or ownership has problems.

try to have the following permissions.

Directories: 755

To change all direcotry permissions to 755 under linux use the following command.

find . -type d -print0 | xargs -I {} -0 chmod 0755 {}

File: 644

To change all file permissions to 644 under linux use the following command.

find . -type f -print0 | xargs -I {} -0 chmod 0644 {}

The file owner should be the user who is running web server, in standard centos server it is apache, on ubuntu its www-data or nobody.

To change the group ownner and group use the following command. cd into the web root directory first.

chown apache:apache . -R

if you dont have access to ssh try do that on ftp client.

share|improve this answer
what should be php handler if i want to chown apache:apache . -R ? – ehmad11 Sep 23 '12 at 8:19

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.