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. RETURN VALUE Upon successful completion, a value of 0 is returned. Oth- erwise, a value of -1 is returned and _e_r_r_n_o is set to indi- cate the error. ERRORS _C_h_o_w_n will fail and the file will be unchanged if: [EINVAL] The argument path does not refer to a file. [ENOTDIR] A component of the path prefix is not a directory. [EINVAL] The path name contains a non-ASCII byte. [ENOENT] The named file does not exist. [EACCES] Search permission is denied on a com- ponent of the path prefix. [EPERM] The effective user ID does not match the owner of the file and the effective user ID is not the super-user. [EROFS] The named file resides on a read-only file system. [EFAULT] _N_a_m_e points outside the process's allo- cated address space. [ELOOP] Too many symbolic links were encountered in translating the path name. SEE ALSO chown(1), passwd(5) Printed 5/23/83 1 CHOWN(2) UNIX Programmer's Manual CHOWN(2) ASSEMBLER (chown = 16.) sys chown; name; owner; group Printed 5/23/83 2