4BSD/usr/man/cat2/chown.2

Compare this file to the similar file:
Show the results in this format:




CHOWN(2)            UNIX Programmer's Manual             CHOWN(2)



NAME
     chown - change owner and group of a file

SYNOPSIS
     chown(name, owner, group)
     char *name;

DESCRIPTION
     The file whose name is given by the null-terminated string
     pointed to by _n_a_m_e has its _o_w_n_e_r and _g_r_o_u_p changed as speci-
     fied.  Only the super-user may execute this call, because if
     users were able to give files away, they could defeat the
     (nonexistent) file-space accounting procedures.

     On some systems, _c_h_o_w_n clears the set-user-id bit on the
     file to prevent accidental creation of set-user-id programs
     owned by the super-user.

SEE ALSO
     chown(1), passwd(5)

DIAGNOSTICS
     Zero is returned if the owner is changed; -1 is returned on
     illegal owner changes.

ASSEMBLER (PDP-11)
     (chown = 16.)
     sys chown; name; owner; group



























Printed 11/10/80                                                1