Help with Samba

I’m attempting to follow How to create a Samba share.

I have an NTFS drive mounted as /media/voron_data.

My /etc/samba/smb.conf file contains:

[voron_data]
        comment = Voron Data
        path = /media/voron_data
        writeable = yes
        browseable = yes
        public = yes
        valid users = clayton
        create mask = 0770
        directory mask =0770

My setup results match the cited doc up to verifying the correct SELinux context.

I ran this command:

sudo semanage fcontext --add --type "samba_share_t" "/media/voron_data(/.*)?"
sudo restorecon -R /media/voron_data

and checked with this command:

ls -Zd /media/voron_data

which reports:

system_u:object_r:fusefs_t:s0 /media/voron_data

However, the doc indicates it should be something like:

unconfined_u:object_r:samba_share_t:s0 /media/voron_data

What did I do wrong?

From the samba_selinux man page:

If you want to allow samba to export ntfs/fusefs volumes, you must turn on the samba_share_fusefs boolean.

setsebool -P samba_share_fusefs 1

OK, made suggested change.

However, ls -Zd still reports system_u:object_r:fusefs_t:s0 instead of unconfined_u:object_r:samba_share_t:s0.

I think it is fine. With that boolean set, Samba processes should be able to access FuseFS files. You can use semanage -o - to verify what settings are in effect.

Other security settings such as DAC permissions and Samba share-level permissions will still be able to block access. There are many “layers” of permissions stacked on top of one another and all must be granted for the file access to succeed.

Yes, it is fine. FINALLY, I can successfully create a Network Location on W11 and access my F41 samba share.

Thank you for clarifying all this! Now I can get back to some work…