Chmod

From Hackepedia
Revision as of 00:00, 28 May 2008 by Franks (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Change the mode of a file or filesystem object. You can use a human readable format or the octal permission modes.

$ chmod 755 $directory
$ ls -lad $directory
drwxr-xr-x 2 frank staff 4096 2008-05-28 00:57 wtf

This has made the $directory read, write and executable to the owner (frank in this case), read and executable to the group (staff in this case) and read and execute to the 'world' (all other users who can access this file).

$ chmod u+s $file
$ chmod +x $script.sh

This makes script.sh executable.

See the manual page of chmod to find further information.