12.07.2015 Views

Red Hat Enterprise Linux 5 Administration Unleashed

Red Hat Enterprise Linux 5 Administration Unleashed

Red Hat Enterprise Linux 5 Administration Unleashed

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

186CHAPTER 7Managing StorageTo use ACLs on the filesystem, the acl package must be installed. If it is not alreadyinstalled, install it via <strong>Red</strong> <strong>Hat</strong> Network as discussed in Chapter 3.Enabling ACLsTo use ACLs, they must be enabled when an ext3 filesystem is mounted. This is mostcommonly enabled as an option in /etc/fstab. For example:LABEL=/share /share ext3 acl 1 2If the filesystem can be unmounted and remounted while the system is still running,modify /etc/fstab for the filesystem, unmount it, and remount it so the changes to/etc/fstab take effect. Otherwise, the system must be rebooted to enable ACLs on thedesired filesystems.If you are mounting the filesystem via the mount command instead, use the -o acloption when mounting:mount -t ext3 -o acl Setting and Modifying ACLsThere are four categories of ACLs per file: for an individual user, for a user group, via theeffective rights mask, and for users not in the user group associated with the file. To viewthe existing ACLs for a file, execute the following:getfacl If ACLs are enabled, the output should look similar to Listing 7.10.LISTING 7.10Viewing ACLs# file: testfile# owner: tfox# group: tfoxuser::rwxgroup::r-xmask::rwxother::r-xTo set or modify existing ACLs, use the following syntax:setfacl -m Other useful options include --test to show the results of the command but not changethe ACL and -R to apply the rules recursively.Replace with one or more space-separated file or directory names. Rules can be setfor four different rule types. Replace with one or more of the following, andreplace in these rules with one or more of r, w, and x (which stand for read,write, and execute):

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!