【问题标题】:Prevent perforce from toggling the execute bit for all users when checking in files签入文件时防止 perforce 为所有用户切换执行位
【发布时间】:2015-07-20 14:07:48
【问题描述】:

如何在签入文件时通过图形客户端强制为所有人保留执行位,而不仅仅是为用户和组保留?

现在我要做的是右键单击文件-> 更改文件类型-> 然后勾选exec bit set in workspace option。这确实保留了执行位,但仅适用于用户和文件组(据我了解,它相当于this 问题中描述的过程)。

我怎样才能让它为所有人保留执行位?

插图。

签入前:

-rwxr-x--x  1 user group_name    0 Jul 20 14:14 test_file
         ^

签入后:

-r-xr-x---  1 user group_name    0 Jul 20 14:24 test_file
         ^

【问题讨论】:

    标签: linux permissions perforce


    【解决方案1】:

    据我所知,p4 尊重您的 umask 配置,所以这可能是您的 umask 的问题:

    $ umask -S
    u=rwx,g=rx,o=rx
    
    $ p4 sync -f some_script
    //depot/path/some_script#1 - refreshing /client/path/some_script
    
    $ ls -algGF some_script
    -r-xr-xr-x 1 0 Jul 21 04:13 some_script*
    
    $ umask o=
    $ umask -S
    u=rwx,g=rx,o=
    
    $ p4 sync -f some_script
    //depot/path/some_script#1 - refreshing /client/path/some_script
    
    $ ls -algGF some_script
    -r-xr-x--- 1 0 Jul 21 04:14 some_script*
    

    【讨论】:

      【解决方案2】:

      将文件类型更改为 +x 以自动设置可执行位。

      【讨论】:

      • 我做了,但只影响用户和组权限,所有权限仍然被清除。
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-01-10
      • 1970-01-01
      • 2012-03-05
      • 2010-12-11
      • 1970-01-01
      • 1970-01-01
      • 2021-12-07
      相关资源
      最近更新 更多