File Mode

The file mode is a 10-character label that identifies the type of file and the permissions for the owner or group. The first character identifies the type of file. The following characters are often found as the first characters.

Character

Description

-

normal file

d

directory

l

link to another file or directory (link is shown in the last column)

The next nine characters of the file mode block are separated in three groups of three characters: permissions for the owner, group, and other. The following table summarizes these three blocks of the file mode.

Character

Permission

Value

-

none assigned

 

r

read

4

w

write

2

x

execute

1

A file called test with a file mode of -rwxr-x--- has a value of 750. The numeric value is used when you change the mode with the chmod (change mode) command. For example:

% chmod 755 test
The number changes the test file mode to read, write, execute for the owner; read and execute for the group and other. The file mode is now:
-rwxr-xr-x
For more information, type man chmod from the UNIX command-line prompt on your Developer Server.

Back