Chmod;chgrp;chown

Source: Internet
Author: User

####################################

# Rights Management directive chmod CHGRP Chown #

# Modified time: 20160529 #

####################################

------------------------------------------------------------------

chmod

The basic rights of Linux files are divided into user/group/others three identities each have Read/write/exectue permissions

-Rwx rwx rwx: First expression file type [d for directory;-for file; l for link file],

The first group is the file owner, the second group is group permissions, and the third group is for other users

R is read permission, W is write permission, X is execute permission, and the digital 421来 is usually used to assign to Rwx,r=4;w=2;x=1.

That is, 5 represents r+x (4+1) and 7 represents r+w+x (4+2+1).

chmod u=rwx,g=rwx,o=rwx filename

Permissions can be set directly via U (user), G (group), O (Others), a (all),

You can also increase or decrease the corresponding permissions by U+r/g-w.

chmod [-r] XYZ filename

[-R] iterates over all subdirectories or files in the directory,

XYZ represents permissions, such as setting 777 to give RWXRWXRWX permissions, and 640 giving rw-r-----permissions.

------------------------------------------------------------------

Chgrp/chown:

  The file has the corresponding user, group,

CHGRP [-r] GroupName filename

Chown [-r] Username filename

  [-R] downward recursive loop modification

Modify Groupname,chown Modify username by chgrp

------------------------------------------------------------------

Chmod;chgrp;chown

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.