u 若使用者创建为『档案』则预设『没有可执行( x )权限』,亦即只有rw这两个项目,也就是最大为 666 分,预设权限以下:-rw-rw-rw-。spa
u 若用户创建为『目录』,则因为 x 与是否能够进入此目录有关,所以默认为全部权限均开放,亦即为 777 分,预设权限以下:drwxrwxrwx。orm
[root@localhost tmp]# touch aaaget
[root@localhost tmp]# ll aaa 同步
-rw-r--r--. 1 root root 0 Mar 13 21:05 aaait
[root@localhost tmp]# mkdir bbbio
[root@localhost tmp]# ll -d bbb/class
drwxr-xr-x. 2 root root 6 Mar 13 21:07 bbb/权限
[root@localhost tmp]# umask 222
[root@localhost tmp]# touch aaa.a
[root@localhost tmp]# ll aaa.a
-r--r--r--. 1 root root 0 Mar 13 21:08 aaa.a
[root@localhost tmp]# mkdir bbb.b
[root@localhost tmp]# ll -d bbb.b/
dr-xr-xr-x. 2 root root 6 Mar 13 21:08 bbb.b/
[root@localhost tmp]# umask 033
[root@localhost tmp]# touch aaa.033
[root@localhost tmp]# ll aaa.033
-rw-r--r--. 1 root root 0 Mar 13 21:17 aaa.033
0022