Remember that the umask specifies which permissions should not be granted.
请记得,umask指定了那个权限不被授予。
The system uses the umask value to reduce the originally requested permissions.
系统使用umask值来减少原始请求的权限。
You can view your umask setting with the umask command, as shown in Listing 14.
您可以使用umask查看umask设置,如清单14清单14所示。
Use the -s option to display the umask symbolically, in a form that shows which are the permissions that are allowed.
使用- s选项来从符号上显示umask,以显示哪个权限被允许的形式。
So, if you would like to keep your files more private and disallow all group or other access to newly created files, you would use a umask value of 0077.
所以,如果您想要保持文件更专有,并且不允许所有组或者其他人访问新创建的文件,就是可以使用umask值0077。
On Linux systems, where users do not have private groups the umask normally defaults to 0022, which removes group and other write permission from new files.
在Linux系统上,用户没有专用组的的情况下,umask通常默认为0022,它可以从新文件中删除组和其他写权限。
Some implementations of mkstemp (3) don't set the umask (2) to a limited value, so it's wise to call umask (2) first to force the file to a restrictive value.
mkstemp(3)的一些实现并没有将umask(2)设置为一个受限的值,所以聪明的做法是先调用umask(2)来强制将文件设置为受限的值。
Where users have a private group (as on the Fedora system used in these examples) the umask normally defaults to 0002 which removes the write permission for other users.
用户有专用组的情况下(例如这些例子中使用的在Fedora系统上),umask通常默认为0002,它删除了其他用户的写权限。
Where users have a private group (as on the Fedora system used in these examples) the umask normally defaults to 0002 which removes the write permission for other users.
用户有专用组的情况下(例如这些例子中使用的在Fedora系统上),umask通常默认为0002,它删除了其他用户的写权限。
应用推荐