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 have one domain hosted on server domain.com, there are about 20 subdomains as addon domains there. For no good reason someone has changed (chgrp) on all files in domain.com directory to domain.com 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

1 Answer 1

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

 
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.