【问题标题】:Can't set permissions correctly in samba configuration when using symlinks使用符号链接时无法在 samba 配置中正确设置权限
【发布时间】:2022-11-17 15:04:00
【问题描述】:

我的目录树如下所示:

users
|_user1 (read - all, write - userfirst)
|
z (read - all, write - nobody)
|_users
  |_user1 (symlik on /users/user1)

我的 smb.conf:

[global]
workgroup = WORKGROUP
security = user
map to guest = bad user
wins support = no
dns proxy = no
allow insecure wide links = yes

[z]
path = /z
public = yes
browsable = yes
read only = yes
follow symlinks = yes
wide links = yes

[user1]
path = /users/user1
public = yes
browsable = yes
write list = userfirst

我也做了: chown -R userfirst /用户/用户1

当我以访客身份安装文件夹时,一切正常,我无法写入任何内容,只读。当我以 userfirst 身份挂载 /user1 时,一切正常,我具有读写权限。问题是,当我以 userfirst 身份挂载 /z 并转到符号链接 user1 时,我的写权限在某处消失了,这很奇怪。我应该怎么做才能以 userfirst 身份挂载时,我可以拥有对 /z/users/user1 的读/写访问权限以及对 /z 的读访问权限?我的 samba 服务器是 debian 11,samba 客户端是 windows 10

【问题讨论】:

    标签: linux filesystems symlink mount samba


    【解决方案1】:

    尝试在 samba 中配置:

    unix extensions = no
    

    如果这不起作用,它也可能是 AppArmor,要么禁用/卸载它,要么配置它以允许:

    [apparmor]
        browseable = no
        path = /home # the path of the location to access
        read only = yes
        guest ok = yes
        valid users = none
    

    【讨论】:

    • 没有帮助:(
    • 如果您摆弄这些值,并在两者之间重新启动 samba 怎么办?
    猜你喜欢
    • 2012-06-05
    • 1970-01-01
    • 1970-01-01
    • 2015-11-14
    • 1970-01-01
    • 1970-01-01
    • 2011-09-27
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多