0

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).

  • http://askubuntu.com/questions/45496/what-is-the-best-way-to-add-files-to-a-website-on-a-lamp-server – Rinzwind Apr 17 '13 at 09:59

1 Answers1

0

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/

  • 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