V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
Chuizi997
V2EX  ›  Linux

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

  •  
  •   Chuizi997 · 2020-12-22 11:09:26 +08:00 · 1826 次点击
    这是一个创建于 1214 天前的主题,其中的信息可能已经有所发展或是发生改变。

    或者说 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 上写上一个其他的目录,将真实目录想要共享出去的子目录做个软链接,但发现普通用户只能看到文件夹无法进入

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

    [share]
    follow symlinks = yes
    wide links = yes
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2747 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 14:51 · PVG 22:51 · LAX 07:51 · JFK 10:51
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.