Linux user Management, user Rights Management, user group management

Source: Internet
Author: User

Linux user Management, user Rights Management, user group management

One: ls-l command explanation

    • The first d indicates is the directory, if the file is-, if the connection is L
    • The 2nd to 4th rwx represents the creator's operation Rights R Read, w write, x execution
    • The 5th to 7th RWX indicates that the file or directory has permission to operate on the owning group.
    • The following 3 R-x, in turn, represent the permissions that the file or directory has on other people, here is R read, and x Execute permissions
    • The number 2 following the permission indicates the number of connections to the current directory or file;
    • The name behind the data that represents the owner of the file or directory
    • followed by a name that represents the group of the file or directory;
    • The number followed by, for example, 4096, indicates the size of the file or directory
    • followed by the date of the day, indicating when the file was created or the last modified time
    • Last Name: Indicates the name of the file or directory

II: User Management useradd Add, Userdel Delete, usermod change

Detailed explanation execution command: Man

All user information in file:/etc/passwd file

1:useradd adding users; syntax

2:userdel delete user; syntax

3:usermod Modify user; syntax

Three: User group management

All the group information in/etc/group

Groupadd add a group; syntax

Groupdel Delete a group; syntax

Groupmod more Group;

Four: chmod Rights Management

    • R (read) Read 4
    • W (write) Write 2
    • E (execute) Execution 1

1: As chmod 777 indicates, set permissions, the owner, the group, the other person's permissions are the largest, readable, writable, executable;

2:chmod Mode permission set Note string: [Ugoa] [+-=] [RWXX]

U: Indicates that the file or directory owner;

G: Representation, Group;

O: Indicate, other

+: indicates increased permissions;

-: Indicates cancellation permission;

=: Indicates set permission;

For example: chmod ugo=rwx file; chmod u+r File

V: Chown user owner and group management;

Chown document owner Management or document group management; syntax

For example: Modify the FTP directory;

sudo chown www-data:www-data ftp/

The owner of the modified FTP directory is www-data, and the group is Www-data

VERBOSE command: Man + command

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.