On my CentOS 5.2 box running Samba (3.0.33-3.29) I created a folder called /upload
.
In samba I configured a share like this:
[upload] comment = upload folder path = /upload valid users = kevin root public = yes writable = yes browsable = yes create mask = 0777 directory mask = 0777 guest ok = yes
I chown
'd the /upload
folder to my account 'kevin' and checked that I could create files and folders via the shell.
I can browse to the machine from Windows 7, authenticate as 'kevin' and see my home directory share and the upload
share but I can't access them.
Windows reports:
Network Error Windows cannot access \\cos-01\upload Check the spelling of the name. Otherwise, there might be a problem with your network. To try to identify and resolve network problems, click Diagnose. Error code: 0x80070035 The network path was not found.
This is a check list of what I've done:
- the account
kevin
was added to samba usingsmbpasswd -a kevin
and setting my password at the same time. The samba and centos passwords are both the same. - the server name
cos-01
is in the/etc/hosts
file i.e.
172.0.0.1 localhost localhost.localdomain 172.17.3.90 cos-01
- I've also set the netbios name in
/etc/samba/smb.conf
- I configured Windows 7's LAN Manager authentication level to "Send LM & NTLM – use NTLMv2 session security if negotiated"
Update:
I tried accessing the share by both IP address and server name i.e. \cos-01\upload or \172.16.3.90\upload. In both cases I get the same error as detailed above.
I checked the /var/log/samba/smbd.log
logfile and see lots of:
[2010/07/02 16:56:10, 0] smbd/service.c:make_connection_snum(1013) '/upload' does not exist or permission denied when connecting to [upload] Error was Permission denied
Best Answer
Is SELinux active? If it is, then you can make it accessible by setting the type to public_content_t. If samba should be able to write to it, then set the type to public_content_rw_t. Note that if you do the latter, you will also need to tell SELinux about this; my system-config-selinux has a boolean for this:
Allow Samba to write files in directories labeled public_content_rw_t