始终设置 Samba 执行权限

Gho*_*der 8 linux samba permissions ubuntu

我有一个 Ubuntu 14.04 服务器,它向 Windows 机器公开了一个 samba 共享。当我连接到共享并使用记事本创建文件时,权限受到尊重并且文件不会变为可执行文件。但是,当我使用 Visual Studio 编辑文件时,每次保存它们时,都会打开可执行位。一些谷歌搜索发现了一个线程,该线程将 wb 文件打开模式与 windows 上的存档属性链接起来,因此在 Linux 上执行 bit。

但是,鉴于我的配置,情况不应该如此。

    read only = no
    acl allow execute always = no
    acl map full contorl = False
    map archive = no
    map system = no
    map hidden = no
    create mask = 0664
    force create mode = 0664
    directory mask = 02775
    force directory mask = 02775
    inherit permissions = False
Run Code Online (Sandbox Code Playgroud)

如果可能的话,我想配置 samba,以便它只保留执行权限 - 期间。

ant*_*_rh 0

我将此行添加到 smb.conf 中:

    store dos attributes = no
Run Code Online (Sandbox Code Playgroud)

我不知道这个选项有什么作用,但它对我有帮助。

map archive = no可能也是需要的。