Shell file permissions and script execution

Source: Internet
Author: User
Tags parent directory

I. Rights Management

1. View file properties

Ls-l

2. Permission Type

Ii. Linux Users and permissions

1. User Management

① Viewing users

ID User1

② adding users

Useradd user1

③ Deleting a user

Userdel-r user1

1. User Group

① New Group

Groupadd G1

② Deleting a group

Groupdel G1

③ adding users to a group

Gpasswd-a user1 G1

④ remove users from the group

Gpasswd-d user1 G1

3. Permission Assignment

Sudo

Iii. user-to-file relationship-permissions

1. chmod Rights Assignment

①chmod 755 File

②chmod a+x File

2. ACL authorization

①setfacl Setting file Permissions

Setfacl-m user:user1:rwx File

②getfacl Viewing file permissions

Getfacl file

③ Delete File permissions

Setfacl-x user:user1 File

④ Empty file permissions

Setfacl-b file

⑤ Creating and Deleting file permissions

You need to set ACL permissions on the directory

Setfacl-m USER:USER1:RW dir

⑥ How to set permissions on directories and subdirectories and files

Setfacl-m User:user1:rw-r dir

⑦ directory and how files inherit permissions from the parent directory

Setfacl-m D:user:user1:rw-r dir

Shell file permissions and script execution

Related Article

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.