Samba 无法访问子目录

Samba cannot access sub-directories

我已经在 /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

原来这是 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 = /"