Can't modify/delete files while users belong the same group

Hibiki

Dabbler
Joined
Jan 6, 2019
Messages
19
Hi all,

I'm quite new to Unix world but I'm trying to do my best to understand it.

In my network, I have a mix of Linux and Windows machines so I keep the approach of datasets with Share Type set to Generic on FreeNAS 11.3-U3.1
I defined UserA and UserB belonging to Group Admin

Permissions on datasets are User:UserA and Group:Admin
User and Group have the full control (rwx); Others have only r-x permissions

From Windows, connected with SMB sharing: If UserB creates a file or root creates a file, it is OK.
When UserA wants to modify the file or delete it or move it (whatever UserA wants to do), Windows rejects the command by saying that I need the permission from UserB or root.

Ok then, I check the permissions with ls -al in a SSH console and I have:

Code:
drwxrwxr-x  2 UserA         admin  5 May 31 09:53 .
drwxr-xr-x  7 root       wheel  7 May 31 08:51 ..
-rw-r--r--  1 root       admin  4 May 31 09:46 test root.txt
-rw-r--r--  1 UserA         admin  0 May 31 09:53 test UserA.txt
-rw-r--r--  1 UserB       admin  0 May 31 09:53 test UserB.txt


So the directory permissions are OK as I have 775 permissions
But files... This is another story, why they are created with rw for user and not rwx? (I checked also with an exe file from Windows and it keeps rw for the permissions)
Same story for the group as only r permission is granted.

So I think that I cannot modify/delete because I have only r permission for the group of UserA or root files.

But why?

How can it be fixed from Windows when files are copied (to write the good permissions for the group also)? Because of course, I can change permissions with chmod but this is quite heavy to do it for each files.
And it works... When I did chmod -R 775 test\ UserB.txt, I'm then able to modify it.

As I'm also using Jails, I prefer to keep the Unix approach for permissions rather than using ACL.

Can you help, I'm stuck!

Cheers ;)
 
Top