File Permissions




4 = Others have permission only to execute

3 = Group has permission only to read and execute

2 = User (file owner) has permission to read, write and execute

1 = For directories, read allows permission to list files, write can create or delete, execute allow to use the cd command


Return to Main Menu | File Organization Menu | Change Permissions | DOWN




chmod [ugo] filename

Changes the user (u), group (g) or other (o) file permission to read (r), write (w), or execute (x) the file. This procedure is done by indicating which group (u, g, or o) then use a plus sign to add a permission or a minus sign to take away a permission.

An octal system can also be used: 1 is execute, 2 is write, and 4 is read. Combinations are obtained as sums.

Examples:

chmod 777 <filename>
Result:
gives everyone permission to do everything (highly not recommendable)


chmod 765 <filename>
Result:
user permission to everything and group has read and write permission only and others has read and execute permission


chmod 741 <filename>
Result:
user permission to everything and group has read permission only and other has execute permission only


chmod u+rwx,g-rwx,o-rwx <filename>
Result:
user is the only one with permission and can read, write , and execute


Return to Main Menu | File Organization Menu | Permissions | UP