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. When you use the umask command without parameters... chmod and umask command to distinguish the chmod 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.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.