Examples of access permissions

Examples of access permissions

1.

   ls -l file1
   -rw-------  2 unixjohn     3287 Apr  8 12:10 file1

The owner of the file has read and write permission.

2.

   ls -l file2
   -rw-r--r--  2 unixjohn     3287 Apr  8 12:11 file2

The owner has read and write permission. Everyone else -the group and all other users- can read the file.

3.

   ls -l myprog
   -rwx--x--x  2 unixjohn     3287 Apr  8 12:10 myprog

The user has read, write and execute permission. Everyone else -the group and all others- can execute the file.

4.

   ls -l
   ...
   drwxr-x---  2 erpl08       1024 Jun 17 10:00 SCCS

This is a directory. The user has red, write and execute permission. The group has read and execute permission on the directory. Nobody else can get access to it.


Top document