The chmod command differs from the umask command to change the access permission of the file directory. It is a very heavy system command. You can use it to control access to files or directories. Umask is a default permission for creating a file or creating a file directory. If the umask command without parameters is used, the current umask value is output. [Root @ localhost root] # umask 0022 usually only uses the last three bits (002) for file permissions. Umask is the opposite of the chmod command setting. umask uses a "complement code", while chmod sets the File Permission code. For files, the system does not allow them to be granted executable permissions at the beginning of creation. Therefore, the maximum File Permission is 6 and the directory is 7. The default file creation permission is used to subtract the value of umask from the maximum value. Therefore, when umask is set to 022, the default file creation permission is 644, while the default directory creation permission is 755. Umask is only a command. After the terminal exits, it becomes invalid and needs to be re-run next time. Try/etc/profile ,~ /. Bash_profile, change umask 022 in the/root/. bash_profile file to 002, And the restart terminal does not take effect. Maybe the terminal does not open the execution environment of these files. Finally, find/etc/bashrc and change umask 022 to umask 002.