The setfacl command in Ubuntu prompts Operationnotsupported error and Solution

Source: Internet
Author: User
ACL is an access control list in Linux. It provides better read/write and access control permissions for files and directories. It is also a frequently used tool for configuring user permissions in Ubuntu. The ACL tool is easy to install: The sudoapt-getinstallacl system automatically downloads and installs the ACL tool. After the installation, you can use setfacl and getfacl to set and obtain access control permissions for files and directories. Recently, when I used ACL to set permissions, I always mentioned

ACL is an access control list in Linux. It provides better read/write and access control permissions for files and directories. It is also a frequently used tool for configuring user permissions in Ubuntu. The ACL tool is very simple to install:

Sudo apt-get install acl

The system automatically downloads and installs the ACL tool. After the installation, you can use setfacl and getfacl to set and obtain access control permissions for files and directories.

Recently, when I used ACL to set permissions, I was always prompted: Operation not supported. I was puzzled. I checked the shell command repeatedly and did not find anything wrong. Later I asked google's instructor, it is found that the file system in Linux is not enabled by default when it is attached. Run the following command to check:

Mount-l

For example, in my VPS, you can view the output information of this command, the directory where I want to set permissions is in/home, And the directory is in the same file system as the root directory, which is uniformly loaded. The file system does not enable ACL support by default. We need to modify/etc/fstab to enable ACL support. The procedure is relatively simple:

Vim/etc/fstab

In the file system options you need, append the acl (in lower case) as follows:

#

/Dev/xvda/ext3 rw, acl 0 1

After modification, save and exit, restart the system, or umount the file system and mount it again. Finally, use mount-l to check whether the ACL is enabled.

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.