Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. 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 want to assign www-data user full rights in folder /var/www/ and all of the files inside this folder.

I have tried chown www-data /var/www/

share|improve this question

migrated from stackoverflow.com Apr 24 '11 at 17:24

This question came from our site for professional and enthusiast programmers.

Note that you'll have to run chown as root, e.g. sudo chown -R www-data /var/www/. – Gilles Apr 25 '11 at 22:26

You need to do chown -R www-data /var/www/ (-R means recursive).

share|improve this answer

Use the "-R" switch to recursively change everything in a directory

chown -R www-data /var/www/
share|improve this answer

Your Answer


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