acl_dup - Linux
Overview
acl_dup duplicates an access control list (ACL) between files or directories. It preserves the ownership, permissions, and extended attributes of the source file or directory.
Syntax
acl_dup [OPTIONS] <SOURCE> <DEST>
Options/Flags
| Option | Description |
|—|—|
| -v | Verbose output |
| -h | Show help |
Examples
Example 1: Duplicate the ACL from source.txt to target.txt:
acl_dup source.txt target.txt
Example 2: Duplicate the ACL from source_dir to target_dir with verbose output:
acl_dup -v source_dir target_dir
Common Issues
- Error: Operation not permitted: Ensure that you have sufficient permissions to modify the ACL on both source and destination files/directories.
 
Integration
setfacl: Set the ACL of a file or directory.getfacl: Get the ACL of a file or directory.aclcheck: Check the ACL of a file or directory.