After upgrading to 12.04, I had to reinstall the LAMP stack. Then I brought all my www project folders from a pen drive to the /var/www folder (using sudo nautilus, and dragging the files in there).

Now I cannot make any changes to the files/directories within /var/www.
Perhaps this changed with the backup copies I dragged in there.

I'd like to know what the default permissions for the /var/www folder are. I don't want to just change the permissions and make my system abnormal and working. Rather I'd like to get it to the correct state that is meant to work.


The default permissions should be set to drwxr-xr-x with root being the owner and root is the default group of the directory

Now if you want to modify the files in that directory, then you will have to change permissions to make your username the owner

sudo chown -R username /var/www/

Personally, on my developing machine, I choose to create a www folder somewhere under my home folder and modify Apache's DocumentRoot to serve from that directory instead of /var/www.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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