All UNIX files have permissions and information attached to them that allow or deny access to the resource, based on the users role. The schema diagram below shows how permissions are structured.
Breakdown of each schema field
The first character location tells us the type of the file. The most common are normal files signified by a ‘-‘, directories identified by a ‘d’ and symbolic links identified by an ‘l’.
The Owner, Group, and Other fields are each made up of three characters which either allow or deny read (r), write (w), or execute (x) activities. If the permission is enabled a single r, w, or x character will be present. If the activity is not allowed, a dash (-) will be present instead.
The links or directories field found right before the owners name tells us either the number of hard links pointing to a regular file, or in the case of a directory, tells us the number of subdirectories found within the directory itself.
Owners name hold the UNIX username of the owner of the file. In Unix groups are also available and can hold ownership rights as well. A user may belong to one or more groups.
The size of the file.
Date the file was created or last modified.
The name of the file.