[Samba] Fruit & uchg
perttu.aaltonen at mac.com
Wed Apr 28 09:23:20 UTC 2021
> On 27. Apr 2021, at 21.59, Andrew Walker <walker.aj325 at gmail.com> wrote:
> On Tue, Apr 27, 2021 at 8:19 AM Perttu Aaltonen via samba <samba at lists.samba.org <mailto:samba at lists.samba.org>> wrote:
> Hello Ralph & others knowledgeable in vfs_fruit and Netatalk.
> How does Samba and Netatalk store the “uchg” user immutable file flag set in macOS? Is it stored in an extended attribute? The behaviour I’m seeing is that setting this flag from either AFP or SMB side isn’t reflected on the other side. Is there a way to change this behaviour?
> To unsubscribe from this list go to the following URL and read the
> instructions: https://lists.samba.org/mailman/options/samba <https://lists.samba.org/mailman/options/samba>
> Ralph can correct me if I'm wrong, but I believe the MacOS SMB client converts schg to the DOS readonly attribute. How this is applied to the samba server depends on samba's configuration. The default is to write it inside the user.DOSATTRIB xattr for the file. In the case of FreeNAS we convert DOS readonly to FreeBSD's urdonly file flag. In this case readonly is enforced by kernel / filesystem, but behavior differs from schg. I presume when you write to do the same to a MacOS SMB server it sets uchg on the other side?
Hi Andrew. I can see user.DOSATTRIB on the server (Ubuntu + Samba + ZFS), but its content doesn’t change when I set uchg flag from the Mac client side and look at it with the getfattr command. So I’m not sure exactly how the server stores it. In any case it isn’t compatible with Netatalk since the flags don’t carry over, although I should have all the correct vfs_fruit settings for Netatalk compatibility.
More information about the samba