Fedora 21 – Sharing a folder in your home directory with seLinux enabled

Written by James McDonald

January 8, 2015

I have a folder in my home directory /home/$USER/scans that I use for dumping scans from a network enabled printer/scanner to my computer. I have used system-config-samba to share the directory.

This is a default install of Fedora 21 which means that seLinux is enabled and that my $HOME/ directory is 700 (rwx______)

When I connect to it using smbclient //host/share -U username to connect to it and then try and list the contents I get  NT_STATUS_ACCESS_DENIED listing \*

Screenshot from 2015-01-08 10:43:51


The fix isn’t to do chmod 777 /home/$USER -R

It’s changing the security context for the directory you are sharing

Screenshot from 2015-01-08 10:44:04


chcon -t samba_share_t /home/jmcd/scans/

You then can connect as you want.

The system-config-samba settings are as follows

Screenshot from 2015-01-08 10:46:14


Screenshot from 2015-01-08 10:46:16


ref: http://serverfault.com/questions/410806/can-connect-to-samba-but-access-denied-to-homes


Submit a Comment

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The reCAPTCHA verification period has expired. Please reload the page.

You May Also Like…