changing default file permissions upon file creation
I just created a new user 'john' using this command: useradd -G developers john. So now john belongs to a group 'developers'.
i set john's umask to 0002 so that members of the group developers edit the files.
when john creates a file, it creates with 'john' as the owner and the group. thus it looks like this:
-rw-rw-r-- 1 john john 0 Sep 29 13:54 text.txt
Q? How can I set his account so that when he creates a file the file created belongs to the group developer instead of john. Eg.
-rw-rw-r-- 1 john developers 0 Sep 29 13:54 text.txt
The /etc/groups file reveals that 'john' does below to the group.
The /etc/passwd file reveals this information:
Finally issuing this command 'id john' gives me this:
uid=504(john) gid=505(john) groups=505(john),503(developers) context=user_u:system_r:unconfined_t
what am i doing wrong or what am not doing?!
Ps. I am using RedHat linux.
Last edited by ceci2; 09-29-2009 at 02:41 PM.