1CHMOD(1)                    General Commands Manual                   CHMOD(1)
2
3
4

NAME

6       chmod - change mode
7

SYNOPSIS

9       chmod mode file ...
10

DESCRIPTION

12       The  mode of each named file is changed according to mode, which may be
13       absolute or symbolic.  An absolute mode is an octal number  constructed
14       from the OR of the following modes:
15
16       4000      set user ID on execution
17       2000      set group ID on execution
18       1000      sticky bit, see chmod(2)
19       0400      read by owner
20       0200      write by owner
21       0100      execute (search in directory) by owner
22       0070      read, write, execute (search) by group
23       0007      read, write, execute (search) by others
24
25       A symbolic mode has the form:
26
27              [who] op permission [op permission] ...
28
29       The  who  part  is  a  combination of the letters u (for user's permis‐
30       sions), g (group) and o (other).  The letter a stands for ugo.  If  who
31       is  omitted, the default is a but the setting of the file creation mask
32       (see umask(2)) is taken into account.
33
34       Op can be + to add permission to the file's mode, - to take  away  per‐
35       mission  and  = to assign permission absolutely (all other bits will be
36       reset).
37
38       Permission is any combination of the letters r  (read),  w  (write),  x
39       (execute),  s (set owner or group id) and t (save text - sticky).  Let‐
40       ters u, g or o indicate that permission is to be taken from the current
41       mode.   Omitting permission is only useful with = to take away all per‐
42       missions.
43
44       The first example denies write permission to others, the second makes a
45       file executable:
46
47              chmod o-w file
48              chmod +x file
49
50       Multiple  symbolic  modes separated by commas may be given.  Operations
51       are performed in the order specified.  The letter s is only useful with
52       u or g.
53
54       Only the owner of a file (or the super-user) may change its mode.
55

SEE ALSO

57       ls(1), chmod(2), chown (1), stat(2), umask(2)
58
59
60
61                                                                      CHMOD(1)
Impressum