>_ IzzyLab

Topic breakdown

The classic Unix permission model only knows the owner, the group and everyone else. To open a file to one particular user without opening it to everyone, you give the file a group that only that user belongs to (often their personal group of the same name) and grant that group the access it needs: chgrp changes the file's group, and chmod 640 leaves the owner read-write, the group read-only and everyone else nothing. The owner stays the same. On file systems with ACL support, the same is done without a group: setfacl -m u:user:r adds a permission for one user on top of the regular bits, and getfacl shows it. ACLs are handy when there are many such users and you don't want to multiply groups.

What's checked

  1. bob can read /srv/data.txt
  2. other users can't read the file
  3. the file's owner is unchanged

What it looks like