SMB permissions behaves different after SCALE 22.02.3 --> 22.02.4 upgrade

ronny.a

Cadet
Joined
Jul 26, 2022
Messages
8
Hi fellow forum users,

I have been struggling for some time to find a configuration for SMB in SCALE that could act as a drop-in replacement for my AFP file share used in my old TrueNAS setup (now long gone). I am the only user and I am almost only interested in a file share mounted onto a single MacOS system. SCALE and SMB it is then, since AFP is dropped in SCALE.

My expectations for the share is that the unix style file permissions are preserved, over SMB. I am the only user so I don't really have to worry too much about multi-user access.

So far I have found (using 22.02.3) that if I create a dataset using "share type: SMB" and "ACL Type: NFSv4" and "ACL mode: Passthrough" I am off to a good start. If I then create an SMB share using "Purpose: Private SMB Dataset and Shares" and finally set the dataset permissions using the "ACL preset NFS4_OPEN" I can get a SMB share that actually preserves the file permissions of my macos files. I might have remembered something wrong here, I've experimented *a lot* with the different combinations.

So, if I mount the SMB share on macos and open a terminal I can chmod files to whatever I want. If I ssh to the SCALE server I can also see that the same file will have the same file permissions (755, 644 etc). I have myself (ronny) as a local user and group on the SCALE server.

Example, create a file by using touch on the share in the macos terminal (ignore file size differences and time stamps, I've copy-pasted at different points in time):
Code:
-rw-r--r--  1 ronny  staff   169B  6 Okt 19:37 file_created_using_22.02.3.txt


Same file on the 22.02.3 server
Code:
-rw-r--r-- 1 ronny ronny  591 Oct  7 17:49  file_created_using_22.02.3.txt


We are ready for the weird part now.

I upgraded to 22.02.4 (I've read the release notes and I cannot find anything that would directly indicate a new SMB behaviour). After booting into the updated system and mounting the share in macos I now see a different file permission setup:
Code:
-rwx------  1 ronny  staff   1,5K  7 Okt 17:52 file_created_using_22.02.3.txt


I can no longer chmod the file to 644 for example.

If I now create a new file using "touch file_at_22.02.4.txt" I get
Code:
-rwx------  1 ronny  staff     0B  7 Okt 19:26 file_at_22.02.4.txt


and on the SCALE server (via ssh) I get
Code:
-rwxrwxrwx 1 ronny ronny    0 Oct  7 19:26  file_at_22.02.4.txt


So, file permissions are now all over the place again. The question is if this is a bug that has been corrected in the 22.02.4 update or if it is a bug that has been introduced? I prefer the behaviour in 22.02.3 and I can also confirm that if I reboot the system back into the old environment (great feature, good work on that one!) I get the file permission behaviour back as I expect.

I've experimented a lot with this and as I said above I really want a drop in replacement for AFP using SMB for a single user (me) on a single client (my only mac laptop). With the "wrong" SMB settings not even time stamps are preserved so it is definitely tricky to setup correct.
 

ronny.a

Cadet
Joined
Jul 26, 2022
Messages
8
I hate to bump a post like this but I haven't seen anyone else mention this in the forum. I've skimmed through the jira tickets a couple of days ago but couldn't decipher them enough to see if this has been reported (or fixed) already.

To summarise; the smb share behaves differently regarding permissions after the 22.02.3 to 22.02.4 upgrade.
 
Top