xref: /inferno-os/man/1/chmod (revision 46439007cf417cbd9ac8049bb4122c890097a0fa)
CHMOD 1
NAME
chmod - change file mode (permissions)
SYNOPSIS
chmod mode file ...
DESCRIPTION
Chmod changes the mode (permissions) of each file according to mode , which may be an octal number or a symbolic change to the existing mode.

A mode can be numerically formed as the OR of the following octal values (a leading 8r is ignored): .TF 0000

0400 read by owner

0200 write by owner

0100 execute (search in directory) by owner

0070 read, write, execute (search) by group

0007 read, write, execute (search) by others

A symbolic mode has the form:

[ who ] op permission

The who part is a combination of the letters u (for user's permissions), g (group) and o (other). The letter a stands for ugo . If who is omitted, the default is a .

The op field can be: + to add permission to the file's mode, - to take away permission , = to assign permission absolutely (all other bits being reset).

The permission field is any combination of the letters r (read), w (write), x (execute), a (append only), l (exclusive access), and t (temporary, not archived).

SOURCE
/appl/cmd/chmod.b

"SEE ALSO"
chgrp (1), ls (1), sys-stat (2)
BUGS
The interpretation of the modes is limited on some host operating systems, particularly variants of Windows.