Archive:Docs/Drafts/AdministrationGuide/Permissions/Introduction

= Permissions =

Introduction
Managing permissions is an important task to be familiar with. There are many tools available such as,  , and. There are two methods available for managing permissions using command line tools: symbolic and numeric. The symbolic method uses symbols such as,  ,  ,  , and so on, to represent owners, groups, and permissions. The numeric method uses a numbering scheme.

Each file and directory has permissions for the owner (UID), group (GID), and everyone else. The permissions for each group consist of three (binary) bits. There are 10 bits in total:  (the 10th bit is the setuid or sticky bit - this will be described later). The first three are the permissions for the owner. The next three are the permissions for the group, and the last three are the permissions for everyone else.

Use the  command to view file and directory permissions: ls -l file1 -rw-rw-r-- 1 user1 group1 0 Oct 22 17:51 file1

The above example shows the following permissions for the  file:
 * user1: read and write
 * group1: read and write
 * everyone else: read

The three main symbols used to represent permissions are,  , and. These represent read, write, and execute permissions respectively. File permissions are as follows:
 * read: files can be opened and viewed using commands such as  and
 * write: edit, save, and delete files
 * execute: allows you to execute the file (files will not be executable unless you also have read permissions)

Permissions for directories are as follows:
 * read: list the contents using the  command
 * write: edit, save, and delete files within said directory
 * execute: allows you to change into said directory using the  command. Execute permissions are required to perform a long listing using the   command. Without execute permissions the   command will return output similar to the following:

ls -l test1/ ls: cannot access test1/file1: Permission denied ls: cannot access test1/file2: Permission denied total 0 -????????? ? ? ? ?               ? file1 -????????? ? ? ? ?               ? file2

Symbolic Method
The following table describes the symbols used to change permissions using the symbolic method. Familiarize yourself with this table before proceeding to the next section:

Examples of using the  command to change file permissions can be found in the  Managing Permissions Using the CLI  section.

Numeric Method
The following table describes the numbering scheme used when changing permissions using the numeric method:

Use the  command to change permissions regardless of whether you are using the symbolic or numeric method.

{| border="1"
 * Previous Page - TOC || Next Page: Managing Permissions Using the CLI
 * Previous Page - TOC || Next Page: Managing Permissions Using the CLI