I want to share a folder on my RHEL to all windows users.

My requirements are:

  1. users need to access from windows
  2. users need read only access
  3. no authentication required

What I have tried:

  1. Samba Server is up and running
  2. Webmin module installed to use SambaUI
  3. Webmin > Servers > Samba Windows File Sharing
  4. Created a new file share with path as /home/guest/testfolder
  5. Used myshare as share name
  6. In security:

    • -Writable :no
    • -Guest access: Guest Only
    • -Guest unix user: nobody
    • -Hosts to allow: all
    • -Hosts to deny: none

I am able to see the folder testfolder but I am not able to browse its contents

1 Answer 1


Does guest Unix user have access to the underlying Unix folder that you're trying to share?

Permissions can get a little confusing when dealing with Samba. The user's that you specify in the smb.conf file need to have access to the Unix filesystem.

So in your case I would assume that the user nobody doesn't have read access to /home/guest/testfolder.


As you've discovered SELinux can impact you're ability to access a directory using Samba. You can do a couple of things if SELinux is blocking you:

- disable it...

This command will temporarily disable it:

$ sudo setenforce 0

This is helpful when trying to determine if it's an issue.

- enable /home Samba access for SELinux...

You need to run this command on the samba server:

$ sudo setsebool -P samba_enable_home_dirs 1. 

If the directories are under /home.

- enable /some/other/dir Samba access for SELinux

If they're anywhere else you need to re-tag their SELinux contexts' like so:

$ sudo chcon -t samba_share_t /some/other/dir
  • I tried setting the user to guest but still of no avail. Do I have to do any other configurations ? Jul 12, 2013 at 13:35
  • @AnandSunderraman - Can you share your stanza from your smb.conf file for this one share?
    – slm
    Jul 12, 2013 at 14:08
  • hey got it working, turns out that I have to disable SELinux. I will post my findings in an answer Jul 12, 2013 at 16:36
  • 1
    @AnandSunderraman - good catch. I always forget about it. You can temporarily disable it setenforce 0. You need to run this command on the samba server setsebool -P samba_enable_home_dirs 1. If the directories are under /home. If they're anywhere else you need to retag their selinux contexts' like so: chcon -t samba_share_t /var/eng.
    – slm
    Jul 12, 2013 at 16:41
  • @AnandSunderraman - see updates.
    – slm
    Jul 12, 2013 at 16:48

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.