10

My question is pretty general. Lets assume I have a linux distribution web server, with the /var/www/ is the web directory. I used my superuser account to upload and unzip the Joomla installation .zip file.

The linux system user for web users is called www-data. Anyway, my question is who should be the ONWER of the folders and files in the web directory of the linux system? Right now, because I used my superuser account to unzip the files, all the folders and files are owned by the super user, and therefore come up in the joomla admin system as being unwritable. I am just a little hesitant to set the www-data user as the owner of the files. Is this OK?

Just for reference, in linux i would change the owner of the folders and files with chown and change the group with chgrp.

Thanks!

2

2 Answers 2

3

It's likely you'll want to change ownership to user www-data. You can see the user assigned to that space by doing # cat /etc/passwd. Always be careful when touching objects as root. You can break a lot of things.

1
  • In linux, you can find out the name of the user running Apache with a command :

    ps aux | grep apache # shows username in the first column

  • Retrieve the groups this user is part of with the groups(1) command:

    groups [USERNAME]

  • Here is a screenshot to find out apache [user-name] and [user-group] in Ubuntu 12.04

    Sample run on Ubuntu 12.04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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