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.
-
you cannot do this. you are probably looking for containers. like ovz ot lxc.– drookieNov 27, 2014 at 9:28
-
1They 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.– HBruijnNov 27, 2014 at 9:31
-
2You may also find some inspiration in what permissions should my website files folders have– HBruijnNov 27, 2014 at 9:40
Add a comment
|
1 Answer
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.
-
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.– siannoneNov 27, 2014 at 9:49 -