Question

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

Posted November 26, 2013 20.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

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
10 answers
Check Apache's error logs:
sudo tail /var/log/apache2/error.log

Do you see anything in there?
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..
Thanks!
Thanks for the Quick answer!

Here is the log's result:

https://www.dropbox.com/sh/gpuke3h7kl8q8oa/71w-5JCius#lh:null-log.png

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:

https://www.dropbox.com/s/afrg6e5pdzyfi9h/stat.png

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
Submit an Answer