RHEL6: Unable to access any Samba share
Posted: Mon Aug 19, 2013 4:18 pm
[PROBLEM]
I was trying to configure a folder to be shared using Samba, on a Redhat Enterprise Linux Server (RHEL) 6.
I did the usual things, like adding my user using "smbpasswd", adding a share config block to /etc/samba/smb.conf - and restarted "smb" and "nmb" services.
I could open the RHEL6 server from Windows7, and logon worked as expected.
But as soon as I tried to open any share on that RHEL6 samba server, I got an error message telling me something like "access denied":
(Sorry, only have the errormessage in German at the moment)
[SOLUTION]
SELinux must be told to allow access to the shared folder:
After telling SELinux that my shared folder was of type "Samba Share", I finally was able to access it.
Details for setting up Samba on RHEL6, can be found in Edward Hurst's blog entry title "RHEL 6 for the Clueless: Samba Server (Updated)".
I was trying to configure a folder to be shared using Samba, on a Redhat Enterprise Linux Server (RHEL) 6.
I did the usual things, like adding my user using "smbpasswd", adding a share config block to /etc/samba/smb.conf - and restarted "smb" and "nmb" services.
I could open the RHEL6 server from Windows7, and logon worked as expected.
But as soon as I tried to open any share on that RHEL6 samba server, I got an error message telling me something like "access denied":
(Sorry, only have the errormessage in German at the moment)
I've checked everything. Several times.Auf \\<servername>\<sharename> konnte nicht zugegriffen werden.
Sie haben keine Berechtigung für den Zugriff auf \\<servername>\<sharename>. Wenden Sie sich an den Netzwerkadministrator, um den Zugriff anzufordern.
[SOLUTION]
SELinux must be told to allow access to the shared folder:
Code: Select all
chcon -t samba_share_t <shared_foldername>
Details for setting up Samba on RHEL6, can be found in Edward Hurst's blog entry title "RHEL 6 for the Clueless: Samba Server (Updated)".