Terminal Icon

Setting UNIX permissions

To change permissions for an item, use the chmod command. The syntax of the command is as follows:

chmod securitygroup [changetype] [permission] [file or directory]

The options for each item in the command are described below.

Securitygroup (The person or group whose permission you are changing.)

Changetype (Whether you are adding or subtracting the permission.)

Permission (The permission you are changing.)

File or directory: The name of the file or directory to change.

Examples:

chmod go-w myfile Removes write access for group and others for the file myfile.

chmod go+rw myfile1 myfile2 Adds read and write access for group and others for files myfile1 and myfile2.

chmod ugo+rwx myfile1 Adds read, write, and execute for everyone for myfile1.

For more information on changing UNIX permissions, refer to the chmod man page by entering: man chmod

See also

UNIX

Open this for me

man page for chmod