A Preliminary Study on ACL of UFS2's new features

Source: Internet
Author: User
Article Title: A Preliminary Study on ACL of UFS2's new features. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

When talking about a complex permission control with a friend yesterday, I mentioned that I could try ufs2 acl. When I published the 5.0 feature, I was first interested in the various features of ufs2, especially the acl. However, it turns out that this acl is different from the kind of acl in my ideal ntfs. By the way, I think that although win2000 Server does not make me very comfortable, the ntfs permission system is indeed more powerful than ufs permission control, and Windows is not so useless. Let's talk about my experiences in the morning:

The old ufs1 has three permissions: u (ser) g (roup) o (ther), u can only be one person, g can be a group of people, and o is all others, after the ufs2 acl is applied, the u can be several persons, while g can be several groups of persons with their respective permissions.

The prerequisite for using acl is:
1. Add options UFS_ACL during kernel compilation (5.1-Release is supported by default kernel );
2. ufs2 (default );
3. Declare acls when mounting (you can modify/etc/fstab ).

In addition, for a mounted system, you cannot use the 'mount-U' method to support acl. You must use a thorough umount to mount the system, therefore, it is a good idea to modify/etc/fstab.

(Note: You can also use tunefs-a enable filesystem to make the acl always take effect, so that you do not have to add the acls parameter to each mount .)

My steps:

1. Modify/etc/fstab

# I did a test on/home.
/Dev/ad0s1f/home ufs rw, acls 2 2 2. Restart reboot 3. Generate the test file touch/home/root/test 4. display the file attributes ls-l/home/root/test.
Root @ bsd5:/root # ls-l/home/root/test-rw-r -- 1 root wheel 0 Jun 29 13:35/home/root/test

Note this:-rw-rwxr --

5. Add an ACL.

Setfacl-m u: cat: rwx, g: mail: rw/home/root/test 6, display file attributes ls-l/home/root/test
Root @ bsd5:/root # ls-l/home/root/test
-Rw-rwxr -- + 1 root wheel 0 Jun 29/home/root/test note this:-rw-rwxr -- +, indicating that the acl is added.

7. List ACL getfacl/home/root/test
Root @ bsd5:/root # getfacl/home/root/test
# File:/home/root/test
# Owner: 0
# Group: 0
User: rw-
User: cat: rwx
Group: r --
Group: mail: rw-
Mask: rwx
Other: r --
So far, our ufs2 acl has been fully explored.

Link: http://cnfug.org/journal/systems/2004/000011.html

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.