Cannot seem to find an answer which includes all of the specifics of my situation. I followed instructions in Sharing a mounted drive with samba on CentOS7, but still have a problem. I have CentOS 7 and a NTFS USB drive connected to it. I would like to share using Samba that drive with my other windows machines (Windows 10). I have successfully mounted the drive to /mymnt/win folder, and I can read the drive from the Linux host machine AND see the share from Windows 10 machine. However, when I attempt to browse into the share from windows I get a "You do not have permission to access \mediapc\LewisData7TB." I can access anonymously a pure Linux share from windows as well.
Here's the relevant /etc/fstab file entry:
/dev/sda2 /mymnt/win ntfs-3g rw,umask=0000,defaults 0 0 -o context="system_u:object_r:samba_share_t:s0"
Here's my /etc/samba/smb.conf file (homes/printers/print$ are all commented out):
[global] workgroup = LEWISFAM server string = Samba Server %v netbios name = mediapc dns proxy = no security = user map to guest = Bad User passdb backend = tdbsam printing = cups printcap name = cups load printers = yes cups options = raw [Anonymous] path = /shares/anonymous guest ok = yes browsable = yes writeable = yes [LewisData7TB] path = /mymnt/win browsable =yes writable = yes guest ok = yes read only = no
When I attempt to configure for SELinux I do this command:
chcon -t samba_share_t /mymnt/win/
I get this error:
chcon: failed to change context of /mymnt/win/ to system_w:object_r:samba_share_t:s0: Operation not supported.
So, my goal is to access to read/write this drive from windows, but not quite there yet.