请教下如何隐藏 samba 共享目录下的某个子目录

2020-12-22 11:09:26 +08:00
 Chuizi997

或者说 samba 个目录下的指定的子目录

目前共享的目录结构

ll  /share
AA/ BB/ CC/ DD/ EE/ FF/ 
#全都为文件夹

想要在共享 share 文件夹 的前提下实现普通用户看不到也访问不了 AA 这个子文件夹,指定的用户可以访问全部文件夹

目前的配置

config file = /etc/samba/conf.d/%U

[share]
comment = XXX
path = /share
public = no
browsable = yes
read only = yes

conf.d 下的子配置

[share]
comment = XXX
path = /share
public = no
browsable = yes
writable = no
write list  = XXX

之前想的是在主配置文件的 path 上写上一个其他的目录,将真实目录想要共享出去的子目录做个软链接,但发现普通用户只能看到文件夹无法进入

1843 次点击
所在节点    Linux
2 条回复
tuding
2020-12-22 11:28:33 +08:00
用 setacl,可以看到,但是不能访问
omph
2020-12-22 15:48:16 +08:00
smb 支持软链接?
[global]
allow insecure wide links = yes

[share]
follow symlinks = yes
wide links = yes

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/737767

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX