LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   setting users max disk space usage (https://www.linuxquestions.org/questions/linux-newbie-8/setting-users-max-disk-space-usage-736744/)

Sylverston 06-30-2009 02:01 PM

setting users max disk space usage
 
Hello to every one,

I just want to know if it's possible to set a maximum disk space usage for every single user?

thanks in advance.

S.

kirukan 06-30-2009 02:05 PM

check about ulimit and user quota
http://www.ss64.com/bash/ulimit.html
http://www.linuxhomenetworking.com/w...ge_with_Quotas

xeleema 06-30-2009 02:35 PM

Yes, actually.
Most modern UNIX distributions have some sort of user quota feature. Recent Linux distributions both "disk" quotas (how much space on a given filesystem a user can take up) and "user" quotas (how much total space across all disks can the user nab).

Quotas limits typically come in two flavors, "soft" (some logs are generated and maybe an email is sent out), and "hard" (drop-dead stop for the user).

The commands used to manage quotas differ between UNIX variants, however on most Linux distributions they're consistent;

Linux Distributions:
(Taken from a CentOS server)
quota - can be run by any user, displays their current quota limits and current allocations. A SuperUser can view other user's usage, whilst normal users can only see their own usage.
edquota- Used by the SuperUser to set, alter, and remove quotas.
quotaoff - disabled quotas (off by default)
quotaon - enables quotas (off by default)

Word to the Wise: When you first start to experiment with quotas, you may see "quota.user" or "aquota.user" files start to pop up in the strangest of places. Do NOT alter those files (change permissions, ownership, cat /dev/null to them, or otherwise remove them). Those are DataBase files that contain the quota information for that particular volume, and things will get very angry with you if that file is removed. Note however that if you're using an XFS filesystem, you needn't worry. The quota information is inserted directly into the filesystem.

P.S: If you're looking for how to manage quotas on other UNIX systems like Solaris, HP-UX, or even IRIX, look for the "UNIX Rosetta Stone" (Mysterious name is intentional).

Sylverston 07-01-2009 02:51 AM

Thank you every body


All times are GMT -5. The time now is 11:37 PM.