Linux Basics (15) File access Control List

Source: Internet
Author: User

When you need to set permissions on a file for a particular user, the traditional chmod operation may not meet our needs, and you can use FACL (file access control system) to set additional permissions on a user for a file. There are two commands associated with this, Serfacl,getfacl.

1.setfacl set permissions.

Usage:

Setfacl-m u:username:perm File ... Set permissions for users

Setfacl-m g:groupname:perm File ... Set permissions for a group

Example:

650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M01/84/4E/wKiom1eMfAqzjo8xAAE4S5r04jA330.jpg-wh_500x0-wm_3 -wmp_4-s_2112218398.jpg "title=" 1.jpg "alt=" Wkiom1emfaqzjo8xaae4s5r04ja330.jpg-wh_50 "/>

Setfacl-x u:username File ...

Setfacl-x g:groupname File ...

Cancels additional permissions on a file that a user or group adds.

Example:

650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M02/84/4E/wKiom1eMfJXxIRlFAACedbY7wjE818.jpg-wh_500x0-wm_3 -wmp_4-s_1326937801.jpg "title=" 2.jpg "alt=" Wkiom1emfjxxirlfaacedby7wje818.jpg-wh_50 "/>

2.getfacl file

View a list of access permissions for a file

650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M02/84/4E/wKiom1eMfQXi54-6AADEmdqhxiQ894.jpg-wh_500x0-wm_3 -wmp_4-s_3783160506.jpg "title=" 3.jpg "alt=" Wkiom1emfqxi54-6aademdqhxiq894.jpg-wh_50 "/>

This article is from the "thick Product Thin Hair" blog, please make sure to keep this source http://joedlut.blog.51cto.com/6570198/1827405

Linux Basics (15) File access Control List

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.