One linux command per day-chmod

Source: Internet
Author: User
The function of chmodchmod (changemode) of a linux command per day is to change the file or directory permissions. Chmod -- help can be used to view specific parameters. Www.2cto.com 1. permission 1. linux has general and special permissions. General permission: r & mdash; read...
The chmod (change mode) function of a linux command every day is to change the file or directory permissions. Chmod -- help can be used to view specific parameters. Www.2cto.com 1. permission 1. linux has general and special permissions. General permissions: r -- read, w -- write, and x -- execute. Special permissions: setuid-Grant normal users the permissions that can be executed by the root user. setgid-similar to setuid, indicates the group, stick bit-the pasting position can be deleted only by the owner and root users. 2. r w x, which forms a three-digit binary number. if you have the permission, it is 1. if not, it is 0. So 0 is none, 1 is only x, 2 is only w, 3 is w and x, and so on. Setuid setgid stickbit is similar. -For users without permissions: u: user file or directory owner g: group file or directory owner o: other except for other users: all users www.2cto.com 3. permission settings: +: add permission-: remove permission =: Set the permission chmod u + rw test.txt to give the owner the permission to read and write test.txt. Chmod 644 test.txt sets the read and write permissions for the owner of test.txt, the group and other users. Chmod 1777 the first temp 1 is stick bit, which grants rwxrwxrwt permission to the temp file.
Author: CrazyNemo
Related Article

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.