如何在 smb.conf 中隐藏两个或多个目录?

Wei*_*eng 4 samba

我的配置smb.conf非常适合向我的 Windows 10 计算机共享目录,例如“samba 目录”。现在我想隐藏两个子目录,例如subdir1subdir2在“samba 目录”下,所以我在 in 中添加了以下行smb.conf

veto files = subdir1, subdir2
Run Code Online (Sandbox Code Playgroud)

但它不起作用,只是subdir2对 Windows 10 机器隐藏。

当我将其更改为 时veto files = subdir1subdir1可以很好地隐藏 Windows 10 的访问。那么,如何在我的 Windows 10 计算机上隐藏两个目录呢?谢谢!

Mor*_*us1 7

“否决文件 = subdir1, subdir2”

语法错误。尝试:

veto files = /subdir1/subdir2
Run Code Online (Sandbox Code Playgroud)

从手册页:

否决文件 (S)

       This is a list of files and directories that are neither visible
       nor accessible. Each entry in the list must be separated by a '/',
       which allows spaces to be included in the entry.
Run Code Online (Sandbox Code Playgroud)