System Administration Guide: Security Services

How to Copy an ACL

    Copy a file's ACL to another file by redirecting the getfacl output.


    % getfacl filename1 | setfacl -f -filename2 
    

filename1

Specifies the file from which to copy the ACL. 

filename2

Specifies the file on which to set the copied ACL. 

Example—Copying an ACL

In the following example, the ACL on ch2.doc is copied to ch3.doc.


% getfacl ch2.doc | setfacl -f - ch3.doc