next up previous contents
Next: Links (ln) Up: File properties (ls -l) Previous: File permission   Contents

Changing file permission (chmod, umask)

You may wish to change the permission on a file to prevent people from tampering with it. Keep in mind that the system manager, an account called ``root'' or ``su'' (super-user) has access to any file regardless of how you set the permissions. Only the owner and the root account (super-user) can change the permissions on a file.

Use the chmod command to change the permission on a file. The default setting for new files is:

-rw-r-r-

(except executable files created by a compiler, which also have all three ``x'' bits set).

For new directories, the default is:

drwxr-xr-x

To change the default permission setting for your current session use the command umask. See the man pages for the proper format for both of these commands and ``Doing More with UNIX'' to see examples of how they work.



h.stilmack@jach.hawaii.edu