My friend's website was working fine until he moved the document root from /var/www/xxx
to /home/user/xxx
.
Apache gives 13 permission denied error messages when we try to access the site via a web browser.
The site is configured as a virtual directory. All the Apache configurations were unchanged (except for the directory change).
We tried to chmod 777 /home/user/xxx
, chown apache /home/user/xxx. But they didn't work.
Is there some kind of security feature set on the user's home directories? The server OS is CentOS (Godaddy VPS).
Any help is appreciated!
Thanks!
Could be SELinux. Check the appropriate log file (/var/log/messages? - been a while since I've used a RedHat derivative) to see if that's blocking the access.
Error:
Info:
Solution:
Turns out... we had to also chmod 755 the parent directory, user, in addition to xxx.
Apache's errorlog will explain why you get a permission denied. Also, serverfault.com is a better forum for a question like this.
If the error log simply says "permission denied", su to the user that the webserver is running as and try to read from the file in question. So for example:
See if one of those gives you the "permission denied" error.
Have you changed the permissions on the individual files as well as just the directory?
Can't you set the Loglevel in httpd.conf to debug? (I'm using FreeBSD)
ee usr/local/etc/apache22/httpd.conf
change loglevel :
'LogLevel: Control the number of messages logged to the error_log. Possible values include: debug, info, notice, warn, error, crit, alert, emerg.'
Try changing to debug and re-checking the error log after that.