U022和022之间的差异 [英] Umask difference between 0022 and 022

查看:146
本文介绍了U022和022之间的差异的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

umask 0022022之间是否有区别?我想将我的umask更改为022.我该怎么做?

Is there any difference between umask 0022 and 022? I want to change my umask to 022. How can I do it?

推荐答案

umask 0022和umask 022之间没有区别.

There is no difference between umask 0022 and umask 022.

八进制umask通过使用按位NOT的参数的一元补码的按位与运算得出.

The octal umasks are calculated via the bitwise AND of the unary complement of the argument using bitwise NOT.

像这样设置umask:

el@apollo:~$ umask 0077
el@apollo:~$ umask
0077
el@apollo:~$ umask 0022
el@apollo:~$ umask
0022

umask值含义的简要摘要:

umask 077-分配权限,以便只有您对文件具有读/写访问权限,并且对您拥有的目录具有读/写/搜索权限.所有其他人均无权访问您的文件或目录.

umask 077 - Assigns permissions so that only you have read/write access for files, and read/write/search for directories you own. All others have no access permissions to your files or directories.

umask 022-分配权限,以便只有您对文件具有读/写访问权限,并且对您拥有的目录具有读/写/搜索权限.其他所有用户仅具有对您的文件的读取访问权限,而对您的目录具有读/搜索访问权限.

umask 022 - Assigns permissions so that only you have read/write access for files, and read/write/search for directories you own. All others have read access only to your files, and read/search access to your directories.

umask 002-分配权限,以便只有您和您的组成员具有对文件的读/写访问权限,以及对您拥有的目录的读/写/搜索访问权限.其他所有用户仅具有对您文件的读取访问权限,并具有对目录的读/搜索功能.

umask 002 - Assigns permissions so that only you and members of your group have read/write access to files, and read/write/search access to directories you own. All others have read access only to your files, and read/search to your directories.

有关umask的详细信息:

如何设置默认umask,请参阅本文: http://www.cyberciti.biz/tips/understanding-linux-unix-umask-value-usage.html

How to set your default umask, see this article: http://www.cyberciti.biz/tips/understanding-linux-unix-umask-value-usage.html

如果您想获得更详细的信息,这是一篇有趣的文章: http://articles.slicehost.com/2010/7/17/umask-and-unusual-file-permissions-and-types

If you want more detailed information this is an interesting article: http://articles.slicehost.com/2010/7/17/umask-and-unusual-file-permissions-and-types

这篇文章的答案还提供了一些有关umask位的见解: https://stackoverflow.com/questions/4056912/question-about-umask-in-linux

The answers to this post also offer some insight into umask bits: https://stackoverflow.com/questions/4056912/question-about-umask-in-linux

这篇关于U022和022之间的差异的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆