6.linux file permissions and directory configuration

Source: Internet
Author: User

First, the System user group:

1. See which user groups the system has:

1.1 Cat/etc/group View all user groups in the system

1.2 Groups view the members of the currently logged in user group

2. Create a user group:

2.1 Groupadd Test_group

3. Modify a user group:

3.1 Groupmod-n NewGroup Oldgroup

4. Delete a user group

4.1 Groupdel testgroup2

Second, the system users:

1. See which users are on the system:

1.1 cat/etc/passwd can view a list of all users

2. Create a User:

2.1 Useradd testuser1 Create user

2.2 passwd testuser1 set new user password

2.3 Usermod-a-G testgroups testuser1 set new User (TestUser1) user Group (testgroups)

3. Modify the User:

3.1 usermod-l testuser3 testuser1 Modify user name

4. Delete the User:

4.1 userdel-r testuser3 Delete User

Third, System files:

1. View file properties

1.1 Ls-al View all properties of the file, 1 is the file type, 234 is the owner permission, 567 is the same user group permission, 890 is other user rights

2. modifying file properties

2.1 Chgrp testgroups Hzc Modify the folder to which the user group belongs

2.2 Chown TestUser2 Hzc Modify folder to belong to user

2.3chmod r:4 w:2 x:1 Modify folder permissions

6.linux file permissions and directory configuration

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.