![为什么 Windows7 不允许我访问这样配置的 Samba 共享?](https://linux22.com/image/1251264/%E4%B8%BA%E4%BB%80%E4%B9%88%20Windows7%20%E4%B8%8D%E5%85%81%E8%AE%B8%E6%88%91%E8%AE%BF%E9%97%AE%E8%BF%99%E6%A0%B7%E9%85%8D%E7%BD%AE%E7%9A%84%20Samba%20%E5%85%B1%E4%BA%AB%EF%BC%9F.png)
$ smbd --version
Version 3.5.4
配置:
[global]
workgroup = WORKGROUP
server string = SHAREME
security = share
hosts allow = 192.168.232.2
load printers = yes
guest account = nobody
log file = /var/log/samba/log.%m
max log size = 50
domain master = no
local master = yes
os level = 35
null passwords = true
username map = /etc/samba/smbusers
name resolve order = hosts wins bcast
dns proxy = no
[up]
comment = smb
path = /var/smb/
public = yes
writable = yes
browseable = yes
force user = nobody
force group = nogroup
create mask = 0777
directory mask = 0777
available = yes
小路:
ls -la /var/smb/
total 4
drwxrw-rw- 2 root root 6 Aug 31 14:21 .
drwxr-xr-x 15 root root 4096 Sep 18 19:51 ..
smbusers:
# Unix_name = SMB_name1 SMB_name2 ...
root = Administrator admin
nobody = guest pcguest smbguest
Windows7:禁止访问整个 \192.168.232.2(从未列出资源)。将 security = share 后,得到以下信息:\192.168.232.2\up 可见,但仍然无法访问。这是什么问题?
答案1
好吧,也许你忘记让除 root 之外的任何人都可以搜索目录 /var/smb。这可能会有所帮助:
# chmod +x /var/smb