Linux Permissions Related

Source: Internet
Author: User

First paragraph: Common file types

-Normal file

D catalog File

B-Block file

L Soft links (equivalent to shortcuts in Windows)

Second paragraph: Permissions

* * * Three-bit for a group

Top three: Represents the file's owner's permissions on the file

Intermediate three-bit: the permissions on the file that represent the genus Group of the file

Post three-bit: represents other people's permissions on the file

R readable

W Writable

X executable

-Placeholder

Third paragraph:

. Represents a permissive level created under the

Command: Getenforce view selinux status

    Vim/etc/sysconfig/selinux

SELinux three levels: change after reboot effective

Enforcing open, effective

Permissive warning but no limit

Disabled uninstalling the module does not use

    

Fourth: Number of file hard connections

Fifth paragraph: Owner

Sixth paragraph: Genus Group

Seventh: File Size (bytes) ll-h (more friendly display of file size)

Eighth Paragraph: Creation date

Nineth paragraph: File name

Modify file permissions (i)

chmod u=rwx Shuai.txt

chmod g=rx,o=x Shuai.txt

chmod u=r,g=-,o=-

Modify directory Permissions (i)

Same as changing files

Recursively modifies the directory itself and all directories and files under it

The command is: chown-r

modify file permissions, Modify directory Permissions (ii)

Use +-= To modify

modify file permissions, Modify directory Permissions (iii)

R------> 4

W------> 2

x------> 1

For files:

READ: Can read the contents of the file

Write: Can modify the contents of the file

Execute: You can execute the file as a program

For catalogs:

READ: You can see subdirectories and sub-files under this directory

Write: You can create, delete, and rename files in this directory

Execute: Can CD into the directory

Linux Permissions Related

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.