403 You don't have permission to access / on this server.

November 26, 2013 6.1k views
Hi! I was having a problem when uploading new themes for my both Wordpress blog. DO's support helped me with it, saying that i had to create and edit a /.htaccess file. I did for the first droplet - ok, nice! When i tried for the second, i was not able to access my blog anymore and got exactly this message: "403 You don't have permission to access / on this server." Can you help me? Thanks
10 Answers
What's the output of:
ls -la /path/to/WordPress/installation

If you see root:root sprinkled anywhere in there, execute:
sudo chown -R www-data:www-data /path/to/WordPress/installation
What (i) operating system and (ii) web server are you running?
Ubuntu 12.10 x64 Server vmlinuz-3.5.0-17-generic hosting in NY2..
Check Apache's error logs:
sudo tail /var/log/apache2/error.log

Do you see anything in there?
Thanks for the Quick answer!

Here is the log's result:


Hmm, seems like it's not able to read the .htaccess file. What's the output of
stat /home/wordpress/public_html/.htaccess
hmm here is it:


Thanks and Excuse my "newbie-ness" :-)
.htaccess is apparently a directory. Do you have any files in there?
ls /home/wordpress/public_html/.htaccess
No, no files! but i'm not able to remove with "sudo rm"
You have to pass the -r flag to rm in order to delete a directory. So you will have to run this command instead:
rm -r /home/wordpress/public_html/.htaccess
Have another answer? Share your knowledge.