Linux file default permissions and hidden permissions resolution

  
                

Linux system files, including folders, will have some permissions. These Linux permissions include default permissions and hidden permissions. This article will analyze the default permissions and hidden permissions of Linux system files.

The default file permissions: umask

[root @ www ~] # umask

0022 "== associated with the general authority is behind three digits!

[root@www ~]# umask -S

u=rwx,g=rx,o=rx

The default situation is as follows:

If the user creates "File", the default "no run (x) permission", that is, only rw two items, that is, the maximum is 666 points, the default permissions are as follows:

-rw-rw -rw-

If the user is created as a "directory", since x is related to whether or not it can enter this directory, the default is to open all permissions, which is 777 points. The default permissions are as follows:

drwxrwxrwx

[root@www ~]# umask

0022

[root@www ~]# touch test1

[root@www ~]# mkdir test2

[root@www ~]# ll

-rw-r--r-- 1 root root 0 Sep 27 00:25 test1

Drwxr-xr-x 2 root root 4096 Sep 27 00:25 test2

Umask utilization and importance

[root@www ~]# umask 002

[root @www ~]# touch test3

[root@www ~]# mkdir test4

[root@ Www ~]# ll

-rw-rw-r-- 1 root root 0 Sep 27 00:36 test3

drwxrwxr-x 2 root root 4096 Sep 27 00:36 test4

In the default case, root's umask will remove more attributes. The root umask defaults to 022. This is based on security considerations. As for general identity users, their umask is usually 002. That is to keep the write power of the same group! Previous123Next page Total 3 pages

Copyright © Windows knowledge All Rights Reserved