# man > chacl(1)

---
type: CommandReference
command: chacl
mode: man
section: 1
source: man-pages
---

## Quick Reference

- `chacl u::rwx,g::r-x,o::r-- file` — set minimum ACL (owner rwx, group r-x, others r--)
- `chacl u::rwx,g::r-x,o::r--,u:bob:r--,m::r-x file` — set ACL with specific user and mask
- `chacl -l pathname` — list ACL of a file or directory
- `chacl -b acl dacl pathname` — set both access ACL and default ACL
- `chacl -d dacl pathname` — set default ACL only
- `chacl -B pathname` — remove all ACLs (Linux-specific, not IRIX)
- `chacl -D pathname` — remove default ACL (Linux-specific, not IRIX)
- `chacl -R pathname` — recursive operation (Linux-specific, not IRIX)

## Name

chacl — change the access control list of a file or directory

## Synopsis

chacl acl pathname...
chacl -b acl dacl pathname...
chacl -d dacl pathname...
chacl -R pathname...
chacl -D pathname...
chacl -B pathname...
chacl -l pathname...
chacl -r pathname...
## Options

- `-b acl dacl` — set both the access ACL (`acl`) and the directory default ACL (`dacl`)
- `-d dacl` — set only the directory default ACL
- `-R` — apply ACL recursively (Linux-specific, not IRIX)
- `-D` — delete the default ACL (Linux-specific, not IRIX)
- `-B` — delete all ACLs (Linux-specific, not IRIX)
- `-l` — list the ACL of a file or directory
- `-r` — remove ACL (Linux-specific, not IRIX)

Each ACL is a string of comma-separated clauses of the form `tag:name:perm`. Tags: `user` (or `u`), `group` (or `g`), `other` (or `o`), `mask` (or `m`). `name` is the user or group name (empty for owner/group). `perm` is a string of `rwx` with `-` for no permission, e.g. `r-x`, `--x`, `---`.

## Examples

Set a minimum ACL (owner rwx, group r-x, others r--):

shell
chacl u::rwx,g::r-x,o::r-- file
Set an ACL with a specific user and mask (must include mask when non-owner/group entries exist):

shell
chacl u::rwx,g::r-x,o::r--,u:bob:r--,m::r-x file1 file2
Copy ACL from `olddir` to `newdir` (both access and default):

shell
chacl -b `chacl -l olddir | sed -e 's/.*\[//' -e 's#/# #' -e 's/]$//'` newdir
## See Also

- [getfacl(1)](https://www.chedong.com/phpMan.php/man/getfacl/1/markdown)
- [setfacl(1)](https://www.chedong.com/phpMan.php/man/setfacl/1/markdown)
- [chmod(1)](https://www.chedong.com/phpMan.php/man/chmod/1/markdown)
- [umask(1)](https://www.chedong.com/phpMan.php/man/umask/1/markdown)
- [acl_from_text(3)](https://www.chedong.com/phpMan.php/man/aclfromtext/3/markdown)
- [acl(5)](https://www.chedong.com/phpMan.php/man/acl/5/markdown)
- [xfsdump(8)](https://www.chedong.com/phpMan.php/man/xfsdump/8/markdown)