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

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.

share|improve this question
Related:… – Lucio Jan 24 '14 at 19:35
up vote 8 down vote accepted

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.

share|improve this answer
Thanks a lot for your info! – itsols Jun 16 '12 at 6:11
You're welcome :) – techexpert Jun 16 '12 at 6:18
Awesome thanks a lot!!!! – Sudheera Nov 11 '14 at 6:24

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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