Samba无法访问子目录

时间:2016-01-31 22:14:18

标签: samba

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

1 个答案:

答案 0 :(得分: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 = /"