System Administration Guide

How to Delete ACL Entries From a File

  1. Delete ACL entries from a file by using the setfacl command.


    $ setfacl -d acl_entry_list filename1 ... 
    
    -d

    Deletes the specified ACL entries. 

    acl_entry_list

    List of ACL entries (without specifying the permissions) to delete from the file or directory. You can only delete ACL entries and default ACL entries for specific users and groups. Table 51-9 and Table 51-10 show the valid ACL entries.

    filename ...

    File or directory from which to delete the ACL entries. 

    Alternately, you can use the setfacl -s command to delete all the ACL entries on a file and replace them with the new ACL entries specified.

  2. To verify that the ACL entries were deleted from the file, use the getfacl command.


    $ getfacl filename
    

Example--Deleting ACL Entries on a File

The following example deletes read permission for the user nigel on the ch4.doc file.


$ setfacl -d user:nigel:4 ch4.doc
$ getfacl ch4.doc
# file: ch4.doc
# owner: nigel
# group: staff
user::r--
group::r--					#effective:r--
other:r--