Unix Tutorial


What is Unix?

Getting started

Hardware

Software

Basic Commands

vi Commands

 

Files

File Commands

Different types of file

File Redirection

Permissions

Pipelines / Filters

 

Directory

Directory Structure

Directory Command

Shell

Different types of shell

Compiling Program

Networking

Commands

Reference

Reference Commands

online help : Manpages

Useful links/Books

 

Search Engine

Permissions and Ownerships


There are three primary types of permission for files: read,write and execute.If no letter is present then it is substituted by a dash -. The dash means that this type of permission is not granted whether it be in the r, w or x position.The first column is broken down into four sub columns. The first sub column is one character long the second, third and fourth are all three characters long for a total of ten characters.The table below is a reflection of the four columns.

File/Directory

User

Group

Other

d

rwx

r-x

r--

The most common file permissions are

Permission

Meaning

---

No access is allowed

r--

Read only access

r-x

Read and execute access, for programs and shell scripts

rw-

Read and write access, for files

rwx

All access allowed, for programs

If the permission of the directory is write then you can add new items and remove items in the directory.

chmod command enables you to specify permissions in two different ways.

  1. type %chmod [permission level] name_of _file.
  2. Check option buttons

Common permissions and their numeric equivalents

Permission

Numeric

Used with

---|---|---

000

All types

r--|---|---

400

Files

r--|r--|r--

444

Files

rw-|---|---

600

Files

rw-|r--|r--

644

Files

rw-|rw-|r--

664

Files

rw-|rw-|rw-

666

Files

rwx|---|---

700

Programs and Directories

rwx|r-x|---

750

Programs and Directories

rwx|r-x|r-x

755

Programs and Directories