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

This question already has an answer here:

I installed LAMP, and created a file named index.html. This file is accessible via browser (localhost/index.html).

But when I moved my project folder to /var/www/ , I can't browse any file via browser.

What to do now?

I tried to change the file permission, but I failed. Is it problem for file permission or server problem?

N.B.: I noticed a 403 forbidden message when I tried to browse localhost/netsys/ (netsys is my project folder).

share|improve this question

marked as duplicate by Rinzwind, Mitch, Kevin Bowen, Takkat, Alvar Apr 17 '13 at 10:54

This question was marked as an exact duplicate of an existing question.

    

Check the permissions of the folders that you have copied inside the www folder. The default permissions should be set to drwxr-xr-x with root being the owner and root is the default group of the directory. Set it up in a recursive manner and it should solve your problem

You may run the command

sudo chown -R yourusername /var/www/
sudo chmod -R 751 /var/www/

share|improve this answer
    
thanks a lot for reply.. But problem isn't Solved completely. After owning the var/www/, i can place files in this folder. But browser can't show any files. New placed files don't show any messages, but the files created before (index.html , testing.php) are showing the Forbidden message. Forbidden You don't have permission to access /index.html on this server. What to do now? Please help. Should i change anything in server configuration files? – mohsen ul alam Apr 17 '13 at 11:21

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