0

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.

2 Answers 2

0

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.

0

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.

You must log in to answer this question.