Linux File Management-IT dream-qi-sharing

Source: Internet
Author: User
Modify the owner and group of the file chown [options] USERNAMEFILENAME modify the owner of the file-R recursive modification -- referenceAB takes A as A reference, change B to the same as that of A. You can modify the chownUSERNAME: GROUPNAMEFILENAMEchownUSERNAME of the owner and group at the same time. GROUPNAMEFILENAMEchown: GROUPN: Modify the owner and group of the file
Chown[Options] modify the owner of a file using USERNAME FILENAME
-R recursive Modification
-- Refere NcE = a B. Use A as the reference and Change B to be the same as.
You can modify the owner and group at the same time.
Chown USERNAME :GROUPNAME FILENAME
Chown USERNAME .GROUPNAME FILENAME
Chown: GROUPNAME FILENAME

Chgrp[Options] groupname filename: Modify the object group

Modify file permissions
Chmod[Options] mode File...
Method:
Chmod u = rw-a.txt owner to grant permissions
Chmod g-w a.txt makes the group not have w Permissions
Chmod a + x/+ x gives everyone the permission to execute the command.
If chmod modifies the directory, only the permission of the directory is modified. The permission of the internal file remains unchanged.
-R can be modified recursively.
-- Reference =
Separate multiple strings with commas (,).
Eg: chmod u = rx, go = r a.txt
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.