LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   CentOS (https://www.linuxquestions.org/questions/centos-111/)
-   -   Creating files/directories a different group inherits it, how to change (https://www.linuxquestions.org/questions/centos-111/creating-files-directories-a-different-group-inherits-it-how-to-change-4175526194/)

JockVSJock 11-22-2014 10:43 AM

Creating files/directories a different group inherits it, how to change
 
Working with CentOS 7.

Whenever I create a file/directory as a standard user, that file/directory is inherited by the group Wheel, not the use that creates it.

That user though it part of the Wheel group and also has their own group under /etc/group.

Is there a way to change this, so that when a user creates a file/directory, the owner is their group, not the Wheel group?

thanks

rknichols 11-22-2014 10:56 AM

What is this user's primary group (the one listed in /etc/passwd and shown by the "id" command as "gid=nnn(name)"?
Is that behavior happening all over the system, or just in one particular directory? The only time a newly created file should inherit the GID of the directory is when that directory has the "set GID" bit set in its permissions (e.g., "drwxrwsr-x").

JockVSJock 11-22-2014 11:00 AM

Here is the output of two commands: id and grep of /etc/passwd

Code:

id cmmiller ; cat /etc/passwd | grep cmmiller
uid=1000(cmmiller) gid=10(wheel) groups=10(wheel), 1000(cmmiller)
cmmiller:x:1000:10:cmmiller:/home/cmmiller:/bin/bash



All times are GMT -5. The time now is 05:30 AM.