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?

link|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 at 21:34
Appears to be apache as the user...tried and failed. – Ben Jan 22 at 21:36
Is there any script trying to access / ? – Lucas Kauffman Jan 22 at 21:40
Nope...nothing. – Ben Jan 22 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 at 21:43
show 7 more comments
feedback

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
or
required, but never shown

Browse other questions tagged or ask your own question.