Alan Freedman -- The Computer Language Company - Computer Desktop Encyclopedia
Computer Desktop Encyclopedia
Longest-Running Tech Reference on the Planet

A CDE Definition

You'll love The Computer Desktop Encyclopedia (CDE) for Tech Term of the Day (TTOD)



(CHange MODe) A Unix command that changes the permissions (attributes) of a file or directory. Chmod requires an understanding of how the read-write-execute permissions are expressed. The "list long" command (ls -l) displays the attributes of a file or directory, and the first part of the line looks like this: -rwxrwxrwx. A dash or "d" as the first character means file or directory. The three sets of rwx are permissions for owner-group-other. For example, -rwxrw-r-- gives all permissions to the file on the line to the owner, read/write permissions to the group and read only for the rest.

The command uses =, + and - to set, add and subtract changes to owner (u), group (g), other (o) or all (a). The following examples show the permissions of an shell script after each command is executed. See ls, shell script, chown and chgrp.

 -rwxrwxrwx          ALL PERMISSIONS

 chmod o=     SET OTHER TO NONE


 chmod o+r    ADD R TO OTHER


 chmod a-x    REMOVE ALL EXECUTE


 chmod a=rwx  SET ALL TO RWX


 chmod a=     SET ALL TO NON


 chmod u=r    SET OWNER TO READ


List Long Shows Permissions
The list long (ls -l) command shows the permissions of files and directories (folders). The arrow points to the permissions in this Mac OS X example (X stands for Unix).

Personal Use Only

Before/After Your Search Term
chipping rateChoice
CHIPRAcholesteric LCD
chips and salsaChooser
chipset graphicschorded keyboard
chirpchording keyboard
chirped pulsechown
CHK filechroma
Chkdskchroma key

Terms By Topic
Click any of the following categories for a list of fundamental terms.
Computer Words You Gotta KnowSystem design
Job categoriesUnix/Linux
Interesting stuffPersonal computers
InternetIndustrial Automation/Process Control
Communications & networkingAssociations/Standards organizations
HistoryDesktop publishing
ProgrammingHealthcare IT
System design