-1

I have have a web server running on my machine and I would like to give the 2 users, misterX and misterY, root privileges for the directory /var/www so that they can also edit the files that are being created by other users and/or scripts.

3
  • you cannot do this. you are probably looking for containers. like ovz ot lxc.
    – drookie
    Nov 27, 2014 at 9:28
  • 1
    They don't necessarily need root, they need correct file system permissions. Either add those users to the groups owning those files. Alternatively investigate POSIX or extended ACL's which you can use to give more granular permissions than the traditional user,group,other permissions.
    – HBruijn
    Nov 27, 2014 at 9:31
  • 2
    You may also find some inspiration in what permissions should my website files folders have
    – HBruijn
    Nov 27, 2014 at 9:40

1 Answer 1

7

You do not need root permissions - you need group permissions. For example if the group is www-data, do something along the lines of usermod -a -G www-data misterX and make sure the files are group-writable.

2
  • Thanks for helping, just a little addition: I had to use the command usermod -a -G www-data misterX since the user is already existing. Maybe someone will find it useful.
    – siannone
    Nov 27, 2014 at 9:49
  • Thanks for the input - I have edited my answer accordingly
    – thanasisk
    Nov 27, 2014 at 10:57

Not the answer you're looking for? Browse other questions tagged .