---
name: "Q_SETQUOTA"
section: "2const"
platform: "linux"
package: "man-pages"
version: "6.19-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/Q_SETQUOTA"
---

# Q\_SETQUOTA(2const)

set quota information for user or group

## NAME

Q\_SETQUOTA - set quota information for user or group

## LIBRARY

Standard C library (*libc*, *-lc*)

## SYNOPSIS

```
#include <sys/quota.h>
```

**int quotactl(QCMD(Q\_SETQUOTA,** *type***), const char \*\_Nullable** *special***,**              **int** *id***, caddr\_t** *addr***);**

**#include \<sys/quota.h\>**    /\* Definition of **Q\_\*** constants \*/ **#include \<sys/syscall.h\>**  /\* Definition of **SYS\_\*** constants \*/ **#include \<unistd.h\>**

**int syscall(SYS\_quotactl\_fd, int** *fd***, QCMD(Q\_SETQUOTA,** *type***),**              **int** *id***, struct dqblk \****addr***);**

## DESCRIPTION

Set quota information for user or group *id*, using the information supplied in the [**dqblk**(2type)](/dqblk/2type.md) structure pointed to by *addr*.

The *.dqb\_valid* field of the [**dqblk**(2type)](/dqblk/2type.md) structure indicates which entries in the structure have been set by the caller.

This operation requires privilege (**CAP\_SYS\_ADMIN**).

## RETURN VALUE

See [**quotactl**(2)](/quotactl/2.md).

## ERRORS

See [**quotactl**(2)](/quotactl/2.md).

- **ERANGE**

  The specified limits are out of the range allowed by the quota format.

## STANDARDS

Linux.

## HISTORY

Linux.

This operation supersedes the **Q\_SETQLIM** and **Q\_SETUSE** operations in the previous quota interfaces.

## SEE ALSO

[**quotactl**(2)](/quotactl/2.md), [**quotactl\_fd**(2)](/quotactl_fd/2.md), [**dqblk**(2type)](/dqblk/2type.md)
