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 just transferred to a new VPS and I am now getting a 403 error when trying to access any of my websites. Here is an example error_log entry:

[Sun Jan 22 21:23:16 2012] [error] [client **] (13)Permission denied: access to / denied

Now I pretty much have exactly the same setup as before (I don't think anything is different as far as I can recall).

I simply downloaded the website via ftp from one host and uploaded it to my new host. I also edited the httpd.conf and vhost files appropriately.

I have tried chmod'ing (-R recursive) the websites directory to 0777, I have trying chown'ing (-R recursive) the websites directory to my main user but it still doesn't work.

I am guessing this is something to do with ownership but I can't figure it out.

UPDATE

I moved the folder to /home/websites rather than /home/someuser/websites and it worked fine....why is that?

share|improve this question
    
chown everything to the owner of yoour webserver. This would be www-data on ubuntu, but I'm not sure for centOS. Also 777 is NEVER a good idea. –  Lucas Kauffman Jan 22 '12 at 21:34
    
Appears to be apache as the user...tried and failed. –  Cheetah Jan 22 '12 at 21:36
    
Is there any script trying to access / ? –  Lucas Kauffman Jan 22 '12 at 21:40
    
Nope...nothing. –  Cheetah Jan 22 '12 at 21:41
1  
right, where did you put the website physically ? Also can you make an index.html in the normal /var/www directory and access it ? –  Lucas Kauffman Jan 22 '12 at 21:43

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.