SETQUOTA(2) UNIX Programmer's Manual SETQUOTA(2) NAME setquota - enable/disable quotas on a file system SYNOPSIS setquota(special, file) char *special, *file; DESCRIPTION Disc quotas are enabled or disabled with the _s_e_t_q_u_o_t_a call. _S_p_e_c_i_a_l indicates a block special device on which a mounted file system exists. If _f_i_l_e is nonzero, it specifies a file in that file system from which to take the quotas. If _f_i_l_e is 0, then quotas are disabled on the file system. The quota file must exist; it is normally created with the _q_u_o_- _t_a_c_h_e_c_k(8) program. Only the super-user may turn quotas on or off. SEE ALSO quota(2), quotacheck(8), quotaon(8) RETURN VALUE A 0 return value indicates a successful call. A value of -1 is returned when an error occurs and _e_r_r_n_o is set to indi- cate the reason for failure. ERRORS _S_e_t_q_u_o_t_a will fail when one of the following occurs: [ENOTDIR] A component of either path prefix is not a directory. [EINVAL] Either pathname contains a character with the high-order bit set. [EINVAL] The kernel has not been compiled with the QUOTA option. [ENAMETOOLONG] A component of either pathname exceeded 255 characters, or the entire length of either path name exceeded 1023 characters. [ENODEV] _S_p_e_c_i_a_l does not exist. [ENOENT] _F_i_l_e does not exist. [ELOOP] Too many symbolic links were encountered in translating either pathname. [EPERM] The caller is not the super-user. [ENOTBLK] _S_p_e_c_i_a_l is not a block device. Printed 11/26/99 August 26, 1985 1 SETQUOTA(2) UNIX Programmer's Manual SETQUOTA(2) [ENXIO] The major device number of _s_p_e_c_i_a_l is out of range (this indicates no device driver exists for the associated hardware). [EROFS] _F_i_l_e resides on a read-only file system. [EACCES] Search permission is denied for a component of either path prefix. [EACCES] _F_i_l_e resides on a file system different from _s_p_e_c_i_a_l. [EACCES] _F_i_l_e is not a plain file. [EIO] An I/O error occurred while reading from or writing to the file containing the quotas. [EFAULT] _S_p_e_c_i_a_l or _p_a_t_h points outside the process's allocated address space. BUGS The error codes are in a state of disarray; too many errors appear to the caller as one value. Printed 11/26/99 August 26, 1985 2