我已将其添加到我的 /etc/samba/smb.conf 中
[srv]
comment = another share
path = /srv
browseable = yes
create mask = 0777
directory mask = 0777
[slash]
comment = another sharedsad
path = /
browseable = yes
writable = yes
create mask = 0777
directory mask = 0777
我可以轻松访问里面的子目录,\\IP\srv\
但是却无法使用 来访问\\IP\slash\
。
SMB 服务器安装在 Linux Mint 17.3 VM 中,我正尝试从 Windows 主机访问它。
smbclient
客户机也出现错误NT_STATUS_ACCESS_DENIED listing \bin
日志显示:
[2016/02/01 03:42:52.256236, 0] ../source3/param/loadparm.c:4365(process_usershare_file)
process_usershare_file: stat of /var/lib/samba/usershares/vk failed. No such file or directory
更新:我刚刚在一个全新的 Digital Ocean droplet 中尝试了同样的配置。它也出现了同样的错误
答案1
这原来是 Samba 4.1+ 中引入的一个错误 https://www.turnkeylinux.org/forum/support/20160104/samba-updated-and-broke-root-share-any-ideas
有两种解决方法:
A) 启用符号链接。将其添加到您的 smb.conf
[global]
wide links = yes
unix extensions = no
B)https://bugzilla.samba.org/show_bug.cgi?id=11647#c7
mkdir /mnt/root
mount -o rbind / /mnt/root
and use "path = /mnt/root" instead of "path = /"