Rewording:
I have a directory with permission 755, shared using samba. I have a samba user abc:abc which is also the owner of that directory. Windows samba client was denied write to the directory. When I chmod the directory to 775, the windows client is now able to write in it.
From the above, I have the conclusion that directory is checking samba user's group permission even though said user is the owner of the directory. Why is it?
Original details:
Apologize if I have any typo, I am typing it from air.
drwxr-xr-x abc abc 4096 DirectoryName
I have smb.conf sharing it.
[something]
comment = something
browseable = yes
path = /something/something
guest ok = no
read only = no
create mask = 0775
valid user = abc
On windows 10, I used user abc to access the samba share. I notice that I don't have permission to write to the folder. It is weird to me because abc is the owner of the directory and it should have full access. I changed the permission with chmod 775 and abc can now write so I have the conclusion that it is using the group permission to access instead.
Why is it? I thought owner permission has priority over group. Is this how it works or just how samba handles permission?
Also is directory mask needed in smb.conf? How is it different from the directory permission itself?
chmod 775 ./I created file & directory. Both show the smb user as owner and group. Weirdly the file has 766 even though I havecreate mask = 0775but that's another question. I set it back tochmod 755 ./and I am unable to create file nor directory.