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

  • Posted November 26, 2013


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


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

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.

What’s the output of: <br><pre>ls -la /path/to/WordPress/installation</pre> <br>If you see <code>root:root</code> sprinkled anywhere in there, execute: <br><pre>sudo chown -R www-data:www-data /path/to/WordPress/installation</pre>

You have to pass the <code>-r</code> flag to <code>rm</code> in order to delete a directory. So you will have to run this command instead: <pre>rm -r /home/wordpress/public_html/.htaccess</pre>

No, no files! but i’m not able to remove with “sudo rm”

.htaccess is apparently a directory. Do you have any files in there? <br><pre>ls /home/wordpress/public_html/.htaccess</pre>

hmm here is it: <br> <br> <br> <br>Thanks and Excuse my “newbie-ness” :-)

Hmm, seems like it’s not able to read the .htaccess file. What’s the output of <pre>stat /home/wordpress/public_html/.htaccess</pre>?

Thanks for the Quick answer! <br> <br>Here is the log’s result: <br> <br> <br> <br>

Check Apache’s error logs: <br><pre>sudo tail /var/log/apache2/error.log</pre> <br>Do you see anything in there?

Ubuntu 12.10 x64 Server vmlinuz-3.5.0-17-generic hosting in NY2… <br>Thanks!

What (i) operating system and (ii) web server are you running?