Q_SETQUOTA(2const)

πŸ“¦
version 6.20 Β· 2 versions
, in arch rolling, nixpkgs unstable

πŸ’… Q_SETQUOTA (2const) πŸ’…

okay bestie, welcome to the quota corner of the Linux manual pages β€” this is Q_SETQUOTA, a quotactl(2) operation, and it's giving authority. ✨


🌸 NAME 🌸

Q_SETQUOTA β€” set quota information for user or group 🫢


πŸ“š LIBRARY πŸ“š

Standard C library (libc, -lc) β€” she lives in libc, periodt.


✨ 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);

two ways to get in: the classic quotactl() way and the syscall(SYS_quotactl_fd, ...) way. both valid, both iconic πŸ’–


πŸ’– DESCRIPTION πŸ’–

So like, this sets quota info for a user or group id, using whatever you stuffed into the dqblk(2type) structure that addr points at. πŸ“

The .dqb_valid field of that dqblk(2type) structure is the vibe check β€” it tells everyone which entries in the structure the caller actually set. so like, if you didn't mark it valid, bestie, it doesn't count. πŸ™ˆ

⚠️ Heads up: this operation requires privilege β€” specifically CAP_SYS_ADMIN. no cap, you need the cap. πŸ‘‘

πŸ”₯ RETURN VALUE πŸ”₯

See quotactl(2). (yes literally, go read that one, she has the receipts πŸ’…)


😭 ERRORS 😭

See quotactl(2).

Also, one of her own:

  • ERANGE β€” The specified limits are out of the range allowed by the quota format. πŸ’€ like girl, those numbers are simply not it, the quota format said no.

πŸ‘‘ STANDARDS πŸ‘‘

Linux. that's it, that's the standard. 🐧


πŸ¦‹ HISTORY πŸ¦‹

Linux.

This operation supersedes the Q_SETQLIM and Q_SETUSE operations in the previous quota interfaces. so if you're still out here using those, bestie... it's giving vintage. retro. nostalgic. move on. 🌈


🌟 SEE ALSO 🌟


okay that's the whole page, you ate it, you understood it, slay πŸŽ€πŸ’œ

this was Linux man-pages 6.20, dated 2026-06-05 β€” mwah, xoxo bestie, go set some quotas responsibly πŸ§šπŸ“

πŸ“¦ where this page comes from
  • arch rolling: man-pages 6.20-1 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
  • nixpkgs unstable: man-pages 6.20
  • πŸ“œ the page's license: Linux-man-pages-copyleft
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms