andersenks
asked on
Group Permission Linux CentOS
I created a group and added users to that group. When users create directories and files the permission on that file/directory show the user not the group so other users in the group cannot acccess it until I do a "chown -R group:group /mnt/storage" and "chmod -R 0770 /mnt/storage/"
Is there a way to get the group to control the permission instead of the user?
See attached code...
Is there a way to get the group to control the permission instead of the user?
See attached code...
[root@server TO VIDEO]# ls -la
total 5124
drwxrwx--- 7 group group 4096 Oct 20 11:00 .
drwxrwx--- 6 group group 4096 Oct 20 11:00 ..
drwxrwx--- 2 group group 4096 Oct 11 08:24 10.07.11
drwxrwx--- 2 group group 4096 Oct 14 16:09 10.13.11
---------- 1 user1 user1 0 Oct 10 16:42 407_DK_C1_Caleb Caballero.aif
-rwxrwx--- 1 user2 user2 4096 Oct 18 15:11 ._407_DK_C1_Finlee Mills.aif
-rwxrwx--- 1 user2 user2 1630860 Oct 10 16:42 407_DK_C1_Finlee Mills.aif
-rwxrwx--- 1 user2 user2 4096 Oct 18 15:11 ._407_DK_C2_Dylan Arrighi.aif
-rwxrwx--- 1 user2 user2 1838000 Oct 10 16:49 407_DK_C2_Dylan Arrighi.aif
-rwxrwx--- 1 user2 user2 4096 Oct 18 15:11 ._407_DK_C3_Lillian Annabelle.aif
-rwxrwx--- 1 user2 user2 1688204 Oct 10 17:00 407_DK_C3_Lillian Annabelle.aif
drwxrwx--- 2 group group 4096 Aug 31 18:41 8.31.11
drwxrwx--- 2 group group 4096 Sep 8 17:10 9.07.11
drwxrwx--- 2 group group 4096 Sep 12 16:58 9.12.11 ADR
-rwxrwx--- 1 group group 4096 Jul 29 04:20 ._.DS_Store
-rwxrwx--- 1 group group 6148 Oct 20 11:43 .DS_Store
[root@server TO VIDEO]# chown -R group:group /mnt/storage
[root@server TO VIDEO]# ls -la
total 5124
drwxrwx--- 7 group group 4096 Oct 20 11:00 .
drwxrwx--- 6 group group 4096 Oct 20 11:00 ..
drwxrwx--- 2 group group 4096 Oct 11 08:24 10.07.11
drwxrwx--- 2 group group 4096 Oct 14 16:09 10.13.11
---------- 1 group group 0 Oct 10 16:42 407_DK_C1_Caleb Caballero.aif
-rwxrwx--- 1 group group 4096 Oct 18 15:11 ._407_DK_C1_Finlee Mills.aif
-rwxrwx--- 1 group group 1630860 Oct 10 16:42 407_DK_C1_Finlee Mills.aif
-rwxrwx--- 1 group group 4096 Oct 18 15:11 ._407_DK_C2_Dylan Arrighi.aif
-rwxrwx--- 1 group group 1838000 Oct 10 16:49 407_DK_C2_Dylan Arrighi.aif
-rwxrwx--- 1 group group 4096 Oct 18 15:11 ._407_DK_C3_Lillian Annabelle.aif
-rwxrwx--- 1 group group 1688204 Oct 10 17:00 407_DK_C3_Lillian Annabelle.aif
drwxrwx--- 2 group group 4096 Aug 31 18:41 8.31.11
drwxrwx--- 2 group group 4096 Sep 8 17:10 9.07.11
drwxrwx--- 2 group group 4096 Sep 12 16:58 9.12.11 ADR
-rwxrwx--- 1 group group 4096 Jul 29 04:20 ._.DS_Store
-rwxrwx--- 1 group group 6148 Oct 20 11:43 .DS_Store
[root@server TO VIDEO]# chmod -R 0770 /mnt/storage/
[root@server TO VIDEO]#
[root@server TO VIDEO]# ls -la
total 5124
drwxrwx--- 7 group group 4096 Oct 20 11:00 .
drwxrwx--- 6 group group 4096 Oct 20 11:00 ..
drwxrwx--- 2 group group 4096 Oct 11 08:24 10.07.11
drwxrwx--- 2 group group 4096 Oct 14 16:09 10.13.11
-rwxrwx--- 1 group group 0 Oct 10 16:42 407_DK_C1_Caleb Caballero.aif
-rwxrwx--- 1 group group 4096 Oct 18 15:11 ._407_DK_C1_Finlee Mills.aif
-rwxrwx--- 1 group group 1630860 Oct 10 16:42 407_DK_C1_Finlee Mills.aif
-rwxrwx--- 1 group group 4096 Oct 18 15:11 ._407_DK_C2_Dylan Arrighi.aif
-rwxrwx--- 1 group group 1838000 Oct 10 16:49 407_DK_C2_Dylan Arrighi.aif
-rwxrwx--- 1 group group 4096 Oct 18 15:11 ._407_DK_C3_Lillian Annabelle.aif
-rwxrwx--- 1 group group 1688204 Oct 10 17:00 407_DK_C3_Lillian Annabelle.aif
drwxrwx--- 2 group group 4096 Aug 31 18:41 8.31.11
drwxrwx--- 2 group group 4096 Sep 8 17:10 9.07.11
drwxrwx--- 2 group group 4096 Sep 12 16:58 9.12.11 ADR
-rwxrwx--- 1 group group 4096 Jul 29 04:20 ._.DS_Store
-rwxrwx--- 1 group group 6148 Oct 20 11:43 .DS_Store
[root@server TO VIDEO]#
ASKER
They are connecting via SMB localy with their usernames.
You will need to set this using the "create mask" directive. See here:
http://lists.samba.org/archive/samba/2003-March/063429.html
http://lists.samba.org/archive/samba/2003-March/063429.html
You need to use the sguid bit on the directory. This will force any files/directories created under it to have the same group as the top level directory
chmod g+s /mnt/storage
chmod g+s /mnt/storage
ASKER
Will try... chmod g+s /mnt/storage
See attatched smb.conf file
See attatched smb.conf file
ASKER
smb.conf
[global]
# logs split per machine
; log file = /var/log/samba/%m.log
# max 50KB per log file, then rotate
; max log size = 5000
log level = 2
netbios name = group
workgroup = workgroup
server string = yogabba storage server
security = user
[homes]
comment = Home Directories
path = /home/%U
valid users = %S
read only = No
browseable = No
writeable = yes
create mode = 0775
[storage]
path = /mnt/storage
writeable = yes
validusers = @group
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Like this?
[global]
# logs split per machine
; log file = /var/log/samba/%m.log
# max 50KB per log file, then rotate
; max log size = 5000
log level = 2
netbios name = group
workgroup = workgroup
server string = storage server
security = user
[homes]
comment = Home Directories
path = /home/%U
valid users = %S
read only = No
browseable = No
writeable = yes
create mode = 0775
[storage]
path = /mnt/storage
writeable = yes
force group = group
validusers = @group
create mask = 770
directory mask = 770
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Looks like that took care of it... thanks guys.
If you give me more context, I can give you more details.