• Home
  • Docker
  • Kubernetes
  • LLMs
  • Java
  • Ubuntu
  • Maven
  • Big Data
  • Archived
Linux-Ubuntu | chmod -- change file ACLs (Access Control Lists)
  1. Notes
  2. Examples
  3. Command Help (man chmod)

  1. Notes

    The chmod command can be used to modify the Access Control Lists (ACLs) associated with files and directories.

    The chmod command can also be used to modify the file mode of files and directories: chmod -- change file modes.

    If a file/directory has an ACL, the sign "+" will be printed when using the command "ls -l".

    Each file/directory has one ACL, containing an ordered list of entries.
    Each entry refers to a user or group, and grants ("allow") or denies ("deny") a set of permissions.
    In cases where a user and a group exist with the same name, the user or the group name can be prefixed with "user:" or "group:".
    If the user or group name contains spaces you can use ':' as the delimiter between name and permission.
  2. Examples
    • Add a new ACL entry that grants the permission "read", "write", "append", and "execute" to "user1" on the file "file1".

    • Add a new ACL entry that denies the permission "write", "append", and "execute" to "user2" on the file "file1".

    • Add a new ACL entry, in a specific location, that grants the permission "read" to "user3" on the file "file1".

    • Delete an ACL entry on the file "file1".

      • Delete deny write permission for "user2" on the file "file1":
      • Delete deny execute and append permissions for "user2" on the file "file1":
      • Delete an ACL entry by its index:
    • Modify an ACL entry by its index.

    • Set the permission "list", "search", "add_file", "add_subdirectory", and "delete_child" to "user1" on the directory "folder1".
  3. Command Help (man chmod)
    • The following options can be used:

    • The following permissions are applicable to files:

    • The following permissions are applicable to directories:

    • The following permissions are applicable to files and directories:

    • ACL inheritance is controlled with the following permissions:
© 2025  mtitek