gpt4 book ai didi

mercurial - Mercurial 创建文件时的默认权限

转载 作者:行者123 更新时间:2023-12-04 15:36:21 27 4
gpt4 key购买 nike

如果 Mercurial does not track file permissions默认情况下,它如何决定它创建的任何文件/目录的权限?

是否使用umask ?如果不是,它有什么用?

我有 read in the mail list下列:

Mercurial uses the mode of the .hg/store directory to compute a mask

但这似乎有点武断(如果背后有任何解释,我很想听听)。这在文档中解释了吗?

最佳答案

似乎没有任何完整的解释,只是在“How To Handle Multiple Committers”页面中提到了它:

If you are using a version of Mercurial older than 1.0, it's important that each user's umask be set to 002 or something similar. If it's set to 022, group write privileges will be masked off for files that users create, causing other users to be unable to modify them.

You can change the default umask for a user by editing their ~/.profile and adding the line...


umask 002

Alternatively, you can edit /etc/profile to change the system-wide settings.
Changing the /etc/profile will not work if people check in stuff with the hg command, as that file isn't read by non-interactive shells, /etc/bash.bashrc is a better place to put the system-wide settings.

Otherwise since Mercurial 1.0, the default permission is inherited from .hg/store.

关于mercurial - Mercurial 创建文件时的默认权限,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8547964/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com