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

Looking at a basic Ubuntu 10.04 server setup, Apache points to /var/www for where to it looks for files to serve up. The default apache user is www.

I'm just trying to set up a plain old WordPress blog. Should I just dump the files into /var/www/ as root or www? User www seems inconvenient since I won't log in as the user, but I guess I can chown the files in /var/www to www. Not that I would log in as root either, but what is the recommended user who should own the /var/www files?

Thanks for the help.

share|improve this question

The apache user (default www-data on ubuntu) needs to own files and directories it must write to, the uploads directory etc.

I prefer that apache doesn't have write access to any files it doesn't need to, though if you're going to be editing the files regularly then it's probably not a great idea to be using the root account for that either. In those cases I'd recommend keeping the files owned by your ordinary user account.

share|improve this answer

One thing to keep in mind is that WordPress's automatic update functionality relies on the ability to FTP into the server on localhost, and enabling FTP access for the root account is generally not a good idea for all kinds of reasons that probably don't need to be explained. Definitely use a different account with FTP access, preferably one that's neither root nor www-data.

share|improve this answer

Your Answer


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