File permissions and directory settings for Linux

Source: Internet
Author: User

1.user/group/others

File Permissions Concepts :

ls meaning list, which focuses on displaying the file name and its associated properties.

First column: File type and Permissions

File type: D directory-file L link file

After nine characters: 1. File owner permissions 2. Same user group permissions 3. Other non-user group permissions

  R Read W write x executable

Second column: How many file names are connected to this node

Column Three: Owner account

Fourth column: Owning user group

Fifth column: The size of the file, the default unit is B

Sixth column: creation date or last modified date

Column seventh: filename of the file

To change file properties and permissions:

1.CHGRP [-R]

Where-R indicates a recursive change

Change the owning user group

eg

2.chown

Change file Owner

3.chmod

Adapted permissions: R_4 w_2 x_1

Eg:chmod 777. BASHRC

U:user G:group O:other A:all

Eg:chmod U=rwx,go=rx. BASHRC

Eg:chmod a+w. BASHRC

Eg:chmod a-x. BASHRC

Ugoa can add and subtract permissions

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.