Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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 has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
askubuntu.com/questions/45496/… –  Rinzwind Apr 17 '13 at 9:59

1 Answer 1

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.