[0m


CHMOD(1)	    UNIX Programmer's Manual		 CHMOD(1)



[1mNAME
     [0mchmod - change mode

[1mSYNOPSIS
     chmod [0m[ [1m-Rf [0m] mode file ...

[1mDESCRIPTION
     [0mThe mode of each named file is changed according to _m_o_d_e,
     which may be absolute or symbolic.  An absolute _m_o_d_e is an
     octal number constructed from the OR of the following modes:

     4000      set user ID on execution
     2000      set group ID on execution
     1000      sticky bit, see _c_h_m_o_d(2)
     0400      read by owner
     0200      write by owner
     0100      execute (search in directory) by owner
     0070      read, write, execute (search) by group
     0007      read, write, execute (search) by others

     A symbolic _m_o_d_e has the form:

	  [_w_h_o] _o_p _p_e_r_m_i_s_s_i_o_n [_o_p _p_e_r_m_i_s_s_i_o_n] ...

     The _w_h_o part is a combination of the letters [1mu [0m(for user's
     permissions), [1mg [0m(group) and [1mo [0m(other).  The letter [1ma [0mstands
     for all, or [1mugo.  [0mIf _w_h_o is omitted, the default is _a but
     the setting of the file creation mask (see umask(2)) is
     taken into account.

     _O_p can be [1m+ [0mto add _p_e_r_m_i_s_s_i_o_n to the file's mode, [1m- [0mto take
     away _p_e_r_m_i_s_s_i_o_n and [1m= [0mto assign _p_e_r_m_i_s_s_i_o_n absolutely (all
     other bits will be reset).

     _P_e_r_m_i_s_s_i_o_n is any combination of the letters [1mr [0m(read), [1mw
     [0m(write), [1mx [0m(execute), [1mX [0m(set execute only if file is a
     directory or some other execute bit is set), [1ms [0m(set owner or
     group id) and [1mt [0m(save text - sticky).  Letters [1mu[0m, [1mg[0m, or [1mo
     [0mindicate that _p_e_r_m_i_s_s_i_o_n is to be taken from the current
     mode. Omitting _p_e_r_m_i_s_s_i_o_n is only useful with [1m= [0mto take away
     all permissions.

     When the [1m-R [0moption is given, _c_h_m_o_d recursively descends its
     directory arguments setting the mode for each file as
     described above.  When symbolic links are encountered, their
     mode is not changed and they are not traversed.

     If the [1m-f [0moption is given, _c_h_m_o_d will not complain if it
     fails to change the mode on a file.

[1mEXAMPLES




[0mPrinted 22/10/92    Revision 1.2 of 19/10/88			1






CHMOD(1)	    UNIX Programmer's Manual		 CHMOD(1)



     The first example denies write permission to others, the
     second makes a file executable by all if it is executable by
     anyone:

	  chmod o-w file
	  chmod +X file

     Multiple symbolic modes separated by commas may be given.
     Operations are performed in the order specified.  The letter
     [1ms [0mis only useful with [1mu [0mor [1mg.

     [0mOnly the owner of a file (or the super-user) may change its
     mode.

[1mSEE ALSO
     [0mls(1), chmod(2), stat(2), umask(2), chown(8)







































Printed 22/10/92    Revision 1.2 of 19/10/88			2



[0m