2

I have been trying now for several days to get my new server up and running. I am running CentOS with MergerFS to pool my drives and samba to host to my windows machines. All of this running in Proxmox as well.

Over the weekend I got a couple of hard drives to start my server out with and am unable to get the shares to work correctly with samba. I have narrowed down the issue and it is being caused by labels. SELinux requires my mergerfs pool to have a label of samba_share_t but for some reason, mergerfs is not letting me change it from fusefs_t. All of my drives are ext4, I am seeing a lot of posts online that say this can be caused by using ntfs but that can't be my issue.

Things I have tried:

  • I have attempted to modify the fstab to include an option to set the context to samba_share_t, but when I do that I get an error say that fuse (used by mergerfs) init does not support the option "content".
  • I have tried manually changing the label of the pool with chcon and I get an error that the operation is not supported.

  • I have tried adding the pool folder with semange and then manually running restorecon and it still doesn't make a change to that specific folder.

Windows being able to see the folder but not able to access it is such a tease, so close yet so far away. If possible, I would like to not have to disable SELinux.

  • 1
    I don't think you can put SELinux labels on a FUSE filesystem. People using NTFS under Linux would have the same problem since the NTFS driver uses FUSE. – Gilles 'SO- stop being evil' Mar 14 '16 at 23:15
  • 1
    Found that out with tons of google digging, and wanted to confirm you are right. Thanks. – soax Mar 15 '16 at 0:47
2

I was able to resolve the issue with just a simple setting change

setsebool -P samba_share_fusefs=1

and then restarting the smb service.

  • Thank you! I would probably just have disabled SELinux, your solution is better. – Smith Oct 14 at 17:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.