I am trying to figure out how to setup the permissions on a directory (/apps)
so both the root
user, and another user justin
can read, and write into the directory.
The user justin is part of the group devs
.
/apps has permissions of drwxrwsr-x
, with owner root and group devs. Additionally it has gid set; chmod g+s /apps
The problem is, with the root user if I touch a file (test) inside /apps the owner is root and group is devs. The permissions on the file is -rw-r--r--
. If I switch to the user justin and try and modify test I get permission denied.
Basically, what is the best way to achieve this? I want it where root can create directories and files, and justin
can read and write those files and directories. This needs to be automated, as files and directories are created it just works, doing a manual update of permissions is not an option.