I have been using Apache-2.0 server in my laptop, initially I used to get many problems regarding permissions so I changed permissions for my root directory /var/www/html like chmod -R 777 www. After then I was free from permissions error and all.Now my root files contains admin,css,js,images,index.php etc... Consider my APP which I developed is a social networking site.Now I don't know which permissions should I give to the server and users of that website in order to load it on web-browser properly. please someone explain what are the necessary things and permissions that we should set to our files.It would be more helpful if the explanation contains a structured format and specific permissions.And explains how these permissions are set to Apache server.
EDITED: Some more help.thanks for suggestions.They clarified some basic doubts but I need some more clarity regarding file structures.suppose when user uploads a image file and I'm saving it to image folder as specified but when I use those pics to load in the page through permissions denied error is occurring.So generally how a project area is set up (especially file structures) in order to free from all these errors.Thanking you...