Listing the Permissions of a File

To list a file's access permissions, use ls with the `−l' option. File access permissions appear in the first column of the output, after the character for file type.

For example, consider the verbose listing of the file `cruise':

−rwxrw−r−− 1 captain crew 8,420 Jan 12 21:42 cruise

The first character (`−') is the file type; the next three characters (`rwx') specify permissions for the user who owns the file; and the next three (`rw−') specify permissions for all members of the group that owns the file except for the user who owns it. The last three characters in the column (`r−−') specify permissions for all other users on the system. All three permissions sections have the same format, indicating from left to right, read, write, and execute permission with `r', `w', and `x' characters. A hyphen (`−') in place of one of these letters indicates that permission is not given. In this example, the listing indicates that the user who owns the file, captain, has read, write, and execute permission, and the group that owns the file, crew, has read and write permission. All other users on the system have only read permission.

Posted on: 16/12/2009








0 Comments
If you want to leave a comment please Login or Register
How to backup your data using rsync......
Understanding autoconf......
The Basics of fdisk......
Accessing Memory Using DMA......
The fd Directory......