Skip to content

Permissions

Who may read, change or run a file? Owners, groups, permission bits, ACLs and attributes, and how to find out why something says "Permission denied".

Basics: Owner, group, rwx and octal notation explained

Basic permissions

  • chmod


    Change permissions as a number or with letters.

  • chown


    Change owner and group of files.

  • chgrp


    Change only the group of files.

  • umask


    Set the default permissions for new files.

Troubleshooting

  • namei


    Show the permissions of every directory along a path.

Access control lists (ACLs)

  • getfacl


    Show additional permissions for single users and groups.

  • setfacl


    Give single users or groups additional permissions.

File attributes

  • lsattr


    Show special attributes like immutable or append only.

  • chattr


    Protect files with attributes like immutable.