Server Fault is a question and answer site for system and network administrators. 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

I just installed Ubuntu with LAMP, to use it as development and test server.

Under terminal and using : sudo, I created a php test file and it's working, but I can't copy files using the graphical interface of Ubuntu to the var/www directory.

I can only Create, Copy, Moving files under Terminal using sedo.

How to give the default user permissions to manage the www directory ?

Thanks in advance.

share|improve this question
Consider setting up permissions like described in this question. – Zoredache Jul 12 '11 at 21:19
up vote 1 down vote accepted

There are many ways to do that but you can set group permissions of /var/www to www-data (rwx) for example (apache's user and group) and you can give the www-data group to your user.

share|improve this answer

go to shell and write:

    chown -R yourusername /var/www/* 
    chmod -R 755 /var/www/* 
share|improve this answer
Giving all files +x is a baaaaaaad idea. – womble Jul 12 '11 at 23:28

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.