gpt4 book ai didi

configuration - 午夜指挥官不尊重umask

转载 作者:行者123 更新时间:2023-12-03 17:39:48 25 4
gpt4 key购买 nike

当我在 Midnight Commander 中创建新文件并保存它(Shift+F4,写一些东西,F2,给文件命名)时,即使我的 umask 设置为 0007,它也是用 640 pemissions 创建的,所以它应该用权限 660 创建。是有什么 secret 的地方可以设置 mc umask 吗?我没有找到。

最佳答案

为了使用您的 umask,您应该停用“保留权限”选项。

有关更多信息,请查看 man并搜索 umask:

Preserve attributes

determines whether to preserve the permissions, timestamps and (if you
are root) the ownership of the original files. If this option is not
set, the current value of the umask will be respected.

mc 由您的用户执行,因此创建新文件的 umask 将是 ~/.bashrc 中配置的默认 umask。

为了设置 umask 0007,编辑你的 ~/.bashrc 并添加以下行:

umask 0007

之后,重新启动 mc 并测试新文件的创建。

我在 debian jessie 上的 docker 容器中测试了上面的这个设置并且工作正常。

您可以在此处找到有关 umask 的更多详细信息:
http://www.cyberciti.biz/tips/understanding-linux-unix-umask-value-usage.html

关于configuration - 午夜指挥官不尊重umask,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39222655/

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