Chmod

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.