Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/variables/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Configuration 午夜指挥官不尊重乌马斯克_Configuration_Umask_Mc - Fatal编程技术网

Configuration 午夜指挥官不尊重乌马斯克

Configuration 午夜指挥官不尊重乌马斯克,configuration,umask,mc,Configuration,Umask,Mc,当我在Midnight commander中创建新文件并保存它时(Shift+F4,write something,F2,命名文件),它是用640个命令创建的,即使我的umask设置为0007,所以它应该使用660个权限创建。有什么秘密的地方可以设置mc umask吗?我没有找到一个。 为了使用您的umask,您应该停用“保留权限”选项 有关更多信息,请查看和搜索umask: Preserve attributes determines whether to preserve the p

当我在Midnight commander中创建新文件并保存它时(Shift+F4,write something,F2,命名文件),它是用640个命令创建的,即使我的umask设置为0007,所以它应该使用660个权限创建。有什么秘密的地方可以设置mc umask吗?我没有找到一个。

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

有关更多信息,请查看和搜索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 乌马斯克0007 之后,重新启动mc并测试新文件的创建

我在debian jessie上的docker容器中测试了上述设置,效果良好

您可以在此处找到有关umask的更多详细信息:

但此选项用于移动/复制操作,我怀疑该设置是否会影响新文件的创建。或者它们位于“复制”对话框本身之外的其他位置?我没有在常规选项中找到它。我的错误是,你是对的,我没有看到你想要创建一个新文件。我更新了答案。这并不能解决问题,这里也提到: