-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.

siannone
  • 101
  • 3
  • you cannot do this. you are probably looking for containers. like ovz ot lxc. – drookie Nov 27 '14 at 09: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 '14 at 09:31
  • 2
    You may also find some inspiration in [what permissions should my website files folders have](http://serverfault.com/questions/357108/what-permissions-should-my-website-files-folders-have-on-a-linux-webserver) – HBruijn Nov 27 '14 at 09:40

1 Answers1

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.

thanasisk
  • 941
  • 6
  • 16
  • 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 '14 at 09:49
  • Thanks for the input - I have edited my answer accordingly – thanasisk Nov 27 '14 at 10:57