代码之家  ›  专栏  ›  技术社区  ›  inanutshellus user6579257

为什么SVN会破坏我的权限设置?

svn
  •  2
  • inanutshellus user6579257  · 技术社区  · 15 年前

    我有一堆SVN管理的文件,权限是664。这些文件不一定归我所有,但它们在我的主要组中。(我只能写给他们,因为他们在我的组中。)当我“svn update”该文件夹时,它会将任何已更改文件的所有者更改为我(很好,谁在乎),并删除对该文件的组写入权限,使权限保留为644,而不是664。怎么回事?

    我知道有一个属性可以设置为“嘿,当你签出/导出这个文件时,确保它是可执行的”,但是不,我只希望在SVN更新现有文件时停止使用我的权限。

    这是SVN的正常行为吗?我可以将其配置为“按原样”保留我的权限吗?

    1 回复  |  直到 15 年前
        1
  •  1
  •   Greg Hewgill    15 年前

    尝试UMASK:

    umask 002
    

    来自UMASK(2):

         The umask() routine sets the process's file mode creation mask to numask
         and returns the previous value of the mask.  The 9 low-order access per-
         mission bits of numask are used by system calls, including open(2),
         mkdir(2), mkfifo(2) and mknod(2) to turn off corresponding bits requested
         in file mode.  (See chmod(2)).  This clearing allows each user to
         restrict the default access to his files.