Control method of user rights under Linux system

Source: Internet
Author: User

Linux access Control List (ACL) is mainly used to control the user's permissions, you can do different users have different permissions on the same file, then how to operate it? The following small compilation teaches you how to set access control lists (ACLs) under Linux to control user permissions.

Working with LIUNX with rights control is an easy task. It can define the permissions of any user,group and other. This is great when you're on a desktop computer or you don't have a lot of user virtual Linux instances, or when users don't want to share files between them. However, if you are in a large organization, you run an NFS or Samba service to different users, and then you will need to be flexible in selecting and setting many complex configurations and permissions to meet the different needs of your organization.

Linux (and other POSIX-compliant operating systems such as UNIX) has a privilege control method called Access Control List (ACL), which is a universal paradigm beyond the assignment of permissions. For example, by default you need to confirm 3 permission groups: Owner, group, and other. With ACLs, you can add permissions to other users or groups, not just simple "other" or groups where the owner does not exist. You can allow specified users A, B, and C to have write permissions instead of having write permissions on their entire group.

ACLs support a variety of Linux file systems, including Ext2, Ext3, Ext4, XFS, BTFRS, and so on. If you are unsure whether your file system supports ACLs, refer to the documentation.

Make ACLs effective on file system

First, we need to install tools to manage ACLs.

In Ubuntu/debian:

$ sudo apt-get install ACL

In Centos/fedora/rhel:

# yum-y Install ACL

In ArchLinux:

# pacman-s ACL

For demonstration purposes, I will use the Ubuntu Server version, similar to other versions.

After the installation ACL is complete, we need to activate our partition's ACL function so we can use it.

First, we check to see if the ACL function is turned on.

$ mount

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.