Permissions for Linux directories and users

Source: Internet
Author: User

Three basic permissions in file permission system in System

• Three attributes of a file:

User group owner (group): The user's primary group is the group of this file

# LL

-rw-r--r-- root 0 where the third and fourth columns are the user's owner and owner Group

L each file or directory has a basic permission bit:rw-r--r-

: RWxL read and write execution meaning:



The meaning of the file

The meaning of the directory

R

Read

can view reading

List of files in a directory can be listed

W

Write

The files can be modified and deleted

Create and delete files in the directory

X

Perform

Files can be run (binary, script)

You can use the command to enter the directory

The permissions of the file are represented by a character, and each character is a group

L Group I: Main (red):L Second Group: Genus Group (blue):L Third Group: Others (green):• the order in which the system permissions are executed when a user accesses a file or directory:

(2) is the user a member of the group? If you are a member of this group, enable group-owned permissions, and if not, perform the next

Use the method that represents the permission, called Mnemonic, and you can also use octal numbers to represent

(),(), (),().

1.3 Allocation of three basic permissions

Root• View file or directory permissions

ll Example:

Total 0

1 root Jul 8 18:28 text.txt

-D first column (other characters): Permissions for the file

Column Three: Owner

Fifth column: Size of File

Seventh column: File name or directory name

• Mnemonic and octal correspondence

Character octal

RW------600

rwxr-r--744

# R4 W2 X1

Belong to the main (and) group (and) other persons ( and) octal

4+2+0=6

4+0+0=4

4+0+0=4


This article is from the "8469270" blog, please be sure to keep this source http://8479270.blog.51cto.com/8469270/1436517

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.