O'Reilly logo

Practical UNIX by Steve Moritsugu - DTR Business Systems

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Understanding File Modes (Permissions)

The following section uses the word file to mean both files and directories, and the word plain, or regular, file to refer to a file (not a directory).

In the previous section, you saw that ls could tell you permission information about files:

ls -ldg security.html
-rwxr-xr--   1 blackie  users 12383 Mar 15 10:27 security.html

The following file modes (permission information) are given in the first 10 characters of each output line from a long listing (see Figure 14.1):

  • 1 character: file type

  • 3 characters: permissions for the user who is the file owner

  • 3 characters: permissions if not owner but in same group

  • 3 characters: permissions if not owner nor in same group

Figure 14.1. File mode is one file type bit and ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required