Samba share not working for /home or subfolders

Hello together,

i am having some issues with my samba setup.
I am able to share and connect to folders in general, but any /home folder or subfolder cant be accessed and gives me a message “no access rights”. The folders are visible but i cant simply access them.

Since I am able to connect to other folders i guess it’s a problem with my folder rights?

The shares are on a fedora server system (small NAS) and i am trying to connect them to my fedora workstation.

My current smb.conf test configuration is pretty simple:

  server role = standalone server
  map to guest = Bad User
  usershare allow guests = yes
  security = user

  comment = testing
  path = /srv/samba/

  comment = testing
  path = /home/myusername/testfolder
  read only = no
  guest ok = yes
  force user = myusername
  force group = myusername

  comment = homefolders
  valid users = %S
  browsable = yes
  writable = yes

I am able to connect to testa but testb and homes are access denied yet visible in nautilus.
i checked and both testa and testb folders have identical user|group and readwrite settings.

I am using the same user on my nas system and on my workstation and on both systems they have an identical user and group id.

I checked a lot of video or text tutorials and there the shares work straight forward. So what am i missing?

Thx alot :slight_smile:

SELinux was preventing share for home folders

setsebool -P samba_enable_home_dirs=1

Hello @brandeis, and welcome to the community. Please take a minute to go over the posts in the #start-here category if you haven’t had a chance yet.

Well, it could be related to SELinux. Try to read this article on the Fedora Magazine, in order to diagnose the issue.

Then, look at this other post here on Ask Fedora:


Check if the Samba user can access the directory:

sudo -u nobody stat /home/myusername/testfolder

Thank you a lot. It was indeed related to SELinux. Security Enhanced Linux prevents the sharing for home folders and by changing the corresponding flag i was able to change this restriction.

I didn’t even consider that anything beside folder restrictions or firewall could be blocking of the share :slight_smile:

Nice to know you solved your issue.
It would be nice if you could share the command you issued, if you remember it.

However this is the power of SELinux. Think to a malicious software wanting to perform an operation on a folder that usually should not be shared without user control: SELinux will prevent that.

Yes i agree it’s a great addition to secure the system.

SELinux was preventing share for home folders

setsebool -P samba_enable_home_dirs=1

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.