Skip to Main Content
How Linux Works
book

How Linux Works

by Brian Ward
May 2004
Beginner content levelBeginner
368 pages
8h 44m
English
No Starch Press
Content preview from How Linux Works

File Modes and Permissions

Every Unix file has a set of permissions that determine whether you can read, write, or run the file. Running ls -l displays the permissions. Here's an example of such a display:

-rw-r--r-- 1 juser  somegroup    7041 Mar 26 19:34 endnotes.html

The first column represents the mode of the file, and it is shown in bold. The mode represents the file's permissions and some extra information. There are four parts to the mode; Figure 1-1 on the next page illustrates the pieces.

The pieces of a file mode

Figure 1-1. The pieces of a file mode

The first character of the mode is the file type. A dash (-) in this position, as in the example, denotes a regular file, ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

How Linux Works, 2nd Edition

How Linux Works, 2nd Edition

Brian Ward
Linux in a Nutshell, 6th Edition

Linux in a Nutshell, 6th Edition

Ellen Siever, Stephen Figgins, Robert Love, Arnold Robbins
Linux in Action

Linux in Action

David Clinton
Linux Under the Hood

Linux Under the Hood

Sander van Vugt

Publisher Resources

ISBN: 9781593270353Errata