Lably
Skip to content

File-system permissions

Technology for controlling access to file system items

  • 12 min read
  • 4 chapters

Related on Lably

Through File system, Execution (computing) and User (computing)

One well-established technology was developed for Unix, later codified by POSIX and is used in Linux. Another common technology is an access-control list (ACL) with multiple variants implemented in file systems and one codified by POSIX. Since POSIX defines both the older Unix-based technology as well as ACLs, the former is called traditional POSIX permissions for clarity even though it is not a well-known term.

A permission-driven user interface tailors the functionality available to the user based on file system item permissions. For example, the interface might hide menu options that are not allowed based on the permissions stored for an item.

History

CTSS

An early time-sharing system, the Compatible Time-Sharing System (CTSS), supported multiple users; each user's account had a "problem number" and "programmer number".

The first version of the CTSS file system supported only two "read-only" file modes, one of which can be unset by the user and the other of which can only be unset with edit cards submitted to the computer center. Files can be shared between users in the same project; shared files are assigned to programmer number zero. There is no protection other than that provided by the read-only bits.

The second version of the file system has separate permission bits for "read-only" and "write-only"; the latter allows only appending to the file. It also has a "private" bit, allowing only the author of the file to access it, and a "protected" bit, allowing only the author of the file to change the file's permissions.

Multics

Users on the Multics time-sharing system have a "Person_id", and projects have a "Project_id"; a user logs on to the system with their Person_id and a Project_id. A file has an access control list (ACL), with entries containing a Person_id or a "*", a Project_id or a "*", and an "instance tag" or a "*". An instance tag represents a type of process; an "a", for example, represents a process from a regular interactive session. The entries in an ACL are matched against the process's Person_id, Project_id, and instance tag; an "*" is a wildcard that matches all Person_ids, Project_Ids, or instance tags. The ACL entry that matches with the fewest wildcards is the one that is used.

An ACL for a file has access permissions of "read", "write", and "execute"; an ACL for a directory has access permissions of "status" (allows reading attributes of files and directories in the directory), "modify" (allows modification of attributes of files and directories in the directory and removing items from the directory), and "append" (allows adding new items to the directory).

TENEX

A user in TENEX belongs to a set of groups.

A file or directory has a set of permission bits, with six bits for permissions for the file or directory's owner, six bits for permissions for other users in the file's or directory's group, and six bits for other users. For a file, the permission bits are "read", "write", "execute", "append", and "each page of the file has its own permissions", with the sixth bit not being used. For a directory, the permission bits are "access allowed" (if not set, no access to the directory is allowed), "files in the directory may be opened" (subject to the file's permission bits), "owner-like functions may be performed without the file's password", and "files may be added to the directory", with the fifth and sixth bits not being used.

TOPS-10

A user account in TOPS-10 has a programmer number and a project number.

A file has a set of permission bits, with three bits for permissions for the file's owner, three bits for permissions for other users with the same project number as the owner, and three bits for all other users. The operating system may be configured to treat any account with a programmer number that is the same as the programmer number of the containing directory as the owner or to treat only an account with the same programmer number and project number as those of the containing directory as the owner. The values for the permission bits are:

  • 7 - no access privileges, except that the owner may look up the file in order to change its permissions;
  • 6 - execute-only;
  • 5 - read and execute;
  • 4 - append, read, and execute;
  • 3 - update, append, read, and execute;
  • 2 - write, update, append, read, and execute;
  • 1 - rename, write, update, append, read, and execute;
  • 0 - change permissions, rename, write, update, append, read, and execute.

The owner is always allowed to change the permissions.

UNIX and Unix-like systems

Files in the first edition of Unix (v1) had five bits of permission:

  • write, non-owner;
  • read, non-owner;
  • write, owner;
  • read, owner;
  • executable;

and a set-UID bit. It had no notion of groups. This continued until the third edition (v3); the fourth edition (v4) introduced groups, and files in v4 had nine bits of permission:

  • read, owner;
  • write, owner;
  • execute, owner;
  • read, group;
  • write, group;
  • execute, group;
  • read, other;
  • write, other;
  • execute, other;

as well as a set-UID and set-GID bit; This is the same set of permissions that are specified in POSIX and that are provided by current Unix and Unix-like systems.


Sign in to keep reading

3 more chapters are free with a Lably account.

More in Computing and communication