On a freshly installed CentOS 6 system I have the following simple smb.conf copied from another system where it is working as expected:
workgroup = MYDOMAIN
browseable = yes
[homes]
guest ok = no
read only = no
[tmp]
path = /tmp
read only = no
guest ok = yes
[backups]
path = /backups
read only = no
guest ok = no
I have disabled SELinux and allowed the Samba ports through on the firewall. I have set joe
's samba password with smbpasswd -a joe
. /home/joe
and /home
have 755 permissions and /home/joe
has user/group joe
. /backups
has user/group root and 777 permissions.
This should allow a user joe
with permission to access /backups to connect to read/write \hostname\backups on Windows or via the samba client on the same Linux host. It should also allow access to \hostname\joe (home directory) given that joe
can access his home directory /home/joe
.
Using the Linux client on the local host:
$ smbclient --user joe '\\hostname\joe'
Enter joe's password:
Domain=[MYDOMAIN] OS=[Unix] Server=[Samba 3.5.10-125.el6]
smb: \> ls
NT_STATUS_ACCESS_DENIED listing \*
62359 blocks of size 33553920. 59182 blocks available
smb: \> cd Documents
smb: \Documents\> ls
NT_STATUS_ACCESS_DENIED listing \Documents\*
62359 blocks of size 33553920. 59182 blocks available
smb: \Documents\>
So here I can connect to the share but can't see the contents, yet can cd to a directory I know is there. Note that /home/joe/Documents
is also 755 and owned by joe
.
Now I'll try to access backups
:
$ smbclient --user joe '\\hostname\backups\'
Enter joe's password:
Domain=[MYDOMAIN] OS=[Unix] Server=[Samba 3.5.10-125.el6]
tree connect failed: NT_STATUS_BAD_NETWORK_NAME
So in this case I can't even connect to the share at all. Further, I see from tail -f /var/log/samba/log.smbd
:
[2013/02/22 11:09:49.734263, 0] smbd/service.c:988(make_connection_snum)
canonicalize_connect_path failed for service backups, path /backups
This message doesn't appear in the case where I'm connectng to my home share. /backups
definitely exists, has mode 777, and is the mountpoint for an external RAID device which is working fine.
I have another system with essentially identical configuration except that it's CentOS 5 and Samba 3.0.33 instead of 3.5.10. Everything works as expected there.
On Windows, trying to access either \\hostname\backups
or \\hostname\joe
(with the right credentials of course) gives an unhelpful 'you do not have permissions… ' dialog with "Details": 'The network name could not be found'.
Please help me get to the bottom of this!
Best Answer
Probably you need to step with iptables. Try this:
pd: excuse my english, I'm using Google Translator.