ACL for Linux

Source: Internet
Author: User

Linux general permissions generally do not meet the shared needs, such as NFS and samba.


Especially samba is the most obvious.


With an ACL, mom doesn't have to worry about file permissions anymore.


ACL permissions are set to two commands: Setfacl set permissions, Getfacl get ACL permission information for the file.

Simple is an example:

The ACL is set in a directory where umask is 022 and the user of that directory is root.

To use an ACL, the mounted partition must have the ACL attribute added:

Mount-o Remount,acl/dev/sdb1/sharedir

Mount-l | grep Sharedir

Edit File/etc/fstab

/dev/sdb1/sharedir ext4 Rw,acl 0 0


Setfacl-m G:group_name:rwx/sharedir Set the group to have ACL permissions on the Sharedir directory, subdirectories do not have

Setfacl-m D:u:use_name:rwx/sharedir Set the user to have ACL permissions on the Sharedir directory and all subdirectories

Depending on the reasoning you get a set of settings:

Setfacl-m U:user_name:rwx/sharedir

Setfacl-m D:g:group_name:rwx/sharedir

Setfacl-k/sharedir

Setfacl-b/sharedir

Setfacl-x U:user_name/sharedir


Use please help for specific usage






ACL for Linux

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.