[17] Daily sharing of linux commands - chmod modification permissions

Hello everyone, this is sdust-vrlab. Linux is a UNIX- like operating system that is free to use and spread freely. The basic idea of ​​Linux has two points: everything is a file; each file has a definite purpose; linux involves IT In all aspects of the industry, in our daily learning, such as cloud computing, operation and maintenance, cloud native, automation, big data, etc., we need to lay a good foundation for Linux. I am also a novice who is learning IT operation and maintenance and networks. I will share a common command of linux every day. I hope this daily sharing column of linux commands can help you, and I also hope that I can improve my technology. We will work together.
Welcome to visit my other columns:
Ruijie Networks Technology: Ruijie Networks Technology (Digital Communication Experiment)
IT Automation Operation and Maintenance: Python-based IT Automation Operation and Maintenance

chmod modify file owner, user group, permissions of other users

Only the file owner and superusers can modify the permissions of the file or directory

chmod ugo+r lmy sets the lmy directory to be readable by all
chmod o+w will give the zqr directory writable permissions to other users

In addition, chmod can also use numbers to indicate permissions such as:

r=4,w=2,x=1

  • If the rwx attribute is 4+2+1=7;

  • If the rw- attribute is 4+2=6;

  • For rx attribute, 4+1=5.

chmod 777 zgh sets the zgh directory to be readable, writable and executable by all
"Not everyone has romance and feelings, it's more about life"
Welcome everyone to criticize and correct in the comment area or private message, thank you!

Guess you like

Origin blog.csdn.net/weixin_51338719/article/details/129376059