问题原文
原帖链接 · Tango · CC BY-SA 4.0
Two servers in the same network, a Windows server (client), and a Linux server (samba share host)
The shared folder can be seen by the client but not accessed. See below for the configuration: smb.conf:
[global]
workgroup = SAMBA
security = user
hosts allow = 192.168.1.40 #(windows server)
passdb backend = tdbsam
bind interfaces only = yes
netbios name = test-server
server role = standalone server
log file = /var/log/samba/%m
log level = 1
[testshare]
path = /home/smbuser/testshare
read only = no
guest ok = yes
guest only = yes
/home/smbuser/testshare:
drwxrwsrwx. 2 smbuser examplegroup 6 Sep 6 16:34 testshare
Firewalls are disabled on both sides.
Windows gives the error:
Windows cannot access
\\192.168.1.20\testshare
You do not have permission to access
\\192.168.1.20\testshare
已采纳解答
原帖链接 · Chris Davies · CC BY-SA 4.0
You've got two issues here
You're trying to access
\192.168.1.20\testshareinstead of\\192.168.1.20\testshare. I'm going to assume that's a typo but it's important to be preciseYou have a
hosts allow = 192.168.1.20entry in thesmb.conf. The documentation (man smb.conf) describes this value as "This parameter is a […] set of hosts which are permitted to access a service". However, from your Windows client you're trying to access a server on address192.168.1.20, showing that your client can't be192.168.1.20. As a result any service will be refused.Temporarily, remove the
hosts allowentry (comment it out) and test that you have connectivity. When you have confirmed this, put the line back but with the correct client IP address.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
