Permission control under Linux system

Source: Internet
Author: User
Tags readable

Permission control under Linux system

1. file Permissions

in our Linux system , the permissions of a file or directory can be divided into 3 types :

R:4 Read

W:2 Write

X:1 Execution

Example :

644: (4+2) (4) (4)

First 6: The permissions of the owner of the current file , 6=4+2 readable writable permissions

Second 4: represents the group permission that the current file belongs to, 4=4 read -only permission

Third 4: represents the current file's out-of-group permissions , 4=4 readable permissions

2. commands to view file permissions:(ls-l or LL)

The total can be divided into 7 major columns :

column 1 ( divided into ten columns ):

1: type of File ,- represents a normal file , D represents a directory , and L represents a soft connection ( equivalent to Shortcut to Window System )

Analyze Permissions with file Bigmovie.avi file

2-4: Current file owner's permissions (rw-), read writable permission ,- symbol indicates no corresponding permission

5-7: The owning group permission (r--) of the current file , readable permission

8-10: out-of-group permissions (r--) for the current file, readable permissions

column 2 : number of nodes in a file (node)

column 3 : Indicates the file owner root user

column 4 : the group root user group that represents the file belongs to

column 5 : shows the size of the file , the default is byte byte , You can use the command LS-LH more user-friendly view of file size

column 6 : Last modified time of file

Column 7 : Name of the file or directory

1. user groups and users in Linux1. Introduction

in our Linux system , There are many user groups , You can also create user groups manually , There are a lot of users under different groups of users .

2. Create a user group and related commands

Groupadd Phpzu: Create a php Group

GROUPADD-G 501 Javazu: Create a group name Javazu, group ID 501 ( Note : System Group ID are less than , Custom Groups ID are greater than ( inclusive ))

Groupdel Phpzu: Delete Group named Phpzu

Groupmod-n New group name old group name

Groupmod-g New group ID old group name

① Creating a user group

column 1 : Group name

column 2 : Group Password

column 3 : group ID

column 4 : users within a group

② Deleting a user group

③ Modifying user groups

Permission control under Linux system

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.