13. File Rights Management

Source: Internet
Author: User
1. Three kinds of basic permissions? R Read permission? W Write permission? X Execute permissions 2. View file and directory permissions? ls–l file name? Display information includes: file type (d directory,-normal file, L link file), file permissions, directory subdirectory or file hard link number, file owner, file group, file size, file creation time, file name? rw-r--r--1 itcast users 2254 2006-05-20 13:47 tt.htm? From the second word character rw-is said that the user itcast have read, write right, no operation right, then the r--indicates that user group users only Read permission, no operation right, The last r--refers to other people (others) only read permission, no write right and run right. 3. Change the operation permissions? chmod "U Master g belongs to group user o Other User a All users" "+ Plus permissions – minus permissions = Plus permissions Remove legacy permissions at the same time delete" "rwx" file or directory name

such as chmod g+w file

?-r The following subdirectories do the same permissions operation? You can also use numbers to represent permissions such as chmod 777 File?r 4 W 2 x 1? to rwx properties 4+2+1=7;? to rw-the property 4+2=6;

4. Change of the principal and the genus Group

Chown command

Purpose: Changes the owner or group associated with the file.

Grammar
Chown [-R] Owner [: Group] {File ... | Directory ...}

For example:

Chown Jim Program.c
Chown-r JOHN:BUILD/TMP/SRC

5. Change the group

CHGRP command: Command to change the group to which the file or directory belongs

For example:

Chgrp Jim Test.txt

Chgrp–r jim/test/

13. File Rights Management

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.