File Permission Schema
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
File Type
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’.
Owner/Group/Other
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.
Links or Directories
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.
Owner Name / Group Name
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.
File Size
The size of the file.
Create / Modify Date
Date the file was created or last modified.
Filename
The name of the file.
Explanation of ls Long Format & chmod through examples
-rwxr-xr-- 1 instruct staff 270311 Aug 11 2009 install.sh
-rw-r--r-- 1 instruct staff 348039 Aug 12 2008 User_Guide.txt
-rw-r----- 1 instruct staff 635106 Aug 12 2009 Admin_Guide.txt
drwxr-xr-x 4 instruct staff 144 Aug 12 2009 Documents
-rwsr-sr-x 1 nobody nobody 169202 Aug 11 2009 httpd
- Log in to post comments