Umask-s Display the default permissions when a user creates a directory or file
mkdir shuaige -ld shuaige View the current permissions of the Shuaige directory (the same as the default permissions above)
Touch-l ABCD -l ABCD view abcd file Right money (note and the default permissions above are not the same)
Note that one x is missing for each permission location
In a Linux system, the files created by default are not executable, so the Linux system is relatively safe.
Umask View default created permissions, return 0022
Understand how directories or file permissions are added (logic and operations), see:
Modify the default value of 022 to 077, what is the permission after the file is created, as follows:
077 Modify the default create file or directory permission to 077
Touch MEINV -L MEINV The default permission to view the Meinv file is already RW-------, not the rw-r--r--of the previous ABCD file.
mkdir mingxing -ld mingxing The permission to view the Mingxing directory is already rwx------, not shuaige of the previous rwxr-xr-x directory.
Linux Commands-Rights Management command: Umask