Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Now i have copied and pasted my own web file that i previously had created on windows 7. The gksudo nautilus command did certainly help me to copy that web file into the /opt/lampp/htdocs directory. As now i have my web file in the directory, when i try to access it by browsing it in the browser like localhost/mywebfile it pops out the Access forbidden! error like

Access forbidden!

You don't have permission to access the requested object. It is either read-protected or not readable by the server.

If you think this is a server error, please contact the webmaster.
Error 403
Apache/2.4.3 (Unix) OpenSSL/1.0.1c PHP/5.4.7  

Also i cannot access that folder that i just copied to the /opt/lampp/htdocs directory. The error says:-

This location could not be displayed. You do not have the permissions necessary to view the contents of “mywebfiles”.
share|improve this question
up vote 4 down vote accepted

This is due to a permission problem. To avoid this error change permission as shown.

Just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

sudo chmod -R 0777 /opt/lampp/htdocs/mywebfile
share|improve this answer
thanks alot @Mitch that definitely helped me out... I was stuck in this problem from yesterday. Thanks alot! Appreciate that!!! – RedArmy_Grg Jun 4 '13 at 10:51
Glad that it worked for you. :) – Mitch Jun 4 '13 at 10:52

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.