0

I'm setting up a Samba-share to use between Fedora hosts. It's basically just a simple fileshare, so when host A puts a file in a folder, B, C and D can access it. Security is not an issue, so passwords doesn't matter.

I've created the folder on A: /home/share/ and given it the following permissions

sudo chown -R nobody:nobody /home/share
sudo chmod -R 777 /home/share

and then I've added the following to my smb.conf

[share]
browseable = yes
path = /home/share/
guest ok = yes
read only = no
create mask = 777

After a restart I try to connect to it from B.

smbclient //192.168.25.135/share

But when I try to list whats in the folder, I get an error:

smb: \> ls
NT_STATUS_ACCESS_DENIED listing \*

What am I missing here?

1 Answer 1

0

Referencing https://serverfault.com/questions/579720/smbclient-directory-listing-gives-nt-status-access-denied/834160#834160, this was solved by:

sudo chcon -t samba_share_t /home/share/
1
  • 1
    This may work for a while, but will stop when something (reboot, filesystem check, system update...) triggers SELinux relabeling (restorecon), unless you also add a labeling rule to SELinux persistent configuration: sudo semanage fcontext -a -t samba_share_t '/home/share(/.*)?' The rules use regular expression syntax, hence the construct at the end to cover both the directory and any files and sub-directories in it with a single rule.
    – telcoM
    Apr 24, 2018 at 12:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .