Samba permission problems

dude123

Cadet
Joined
Aug 21, 2020
Messages
2
Hi!

I`ve just installed FreeNAS-11.3-U3.2 and setup a samba share. Everything is working ok so far, only problem is that if I move a file from one shared folder to another one it losts the owner of the file...and after that it cant be copied, moved or anything because I`ll lose all the permissions. How can I fix it? Thanks
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,553
Moving a file from one share to another implies copying the file. This means that the owner of the file is now the user in the SMB session doing the copy job. The resulting ACL on the new file is determined by either (1) the ACL on the parent directory of the new path or (2) the ACL that the SMB client decides to set on the new file.

The easiest way to ensure that users are able to read / write in a predictable way is to put them in groups and then use the ACL editor to explicitly define the permissions that each group should have in the relevant share.
 

dude123

Cadet
Joined
Aug 21, 2020
Messages
2
If I just copy the file everything is ok...just when I move. There is just one user in the wheel group. So there is shared folder/a/a.txt and I move it to shared folder/b/a.txt it will lost all the permissions. When I go over ssh to the freenas server and put back the permission to the moved file than everything goes back to normal.
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,553
If I just copy the file everything is ok...just when I move. There is just one user in the wheel group. So there is shared folder/a/a.txt and I move it to shared folder/b/a.txt it will lost all the permissions. When I go over ssh to the freenas server and put back the permission to the moved file than everything goes back to normal.
How are you applying permissions? I don't see this behavior when using GUI with ACL manager and SMB dataset type. Are "a" and "b" in this context separate datasets?
 
Top