1753513 Members
5442 Online
108795 Solutions
New Discussion юеВ

Disk space limitation

 
SOLVED
Go to solution
Jonathan Caplette
Regular Advisor

Disk space limitation

Hi guys,

I wanna know if it's possible to set a limit of space on a home directory or other directory that a user can use. I explain my self:

For exemple I have 2 user, who their home dir are: /home/user1 ans /home/user2 can I say for user1 that he can put for 1gb of data in is home and for user2 he can put 500mb of data in si home... And can I limit the number of files in a directory???

If so, how can I see the limitation and how can I set that thing..

Thanks!!!
Jo
5 REPLIES 5
James R. Ferguson
Acclaimed Contributor
Solution

Re: Disk space limitation

Hi:

You can setup disk quotas. For more information, see:

# man 5 quota

Regards!

...JRF...
Patrick Wallek
Honored Contributor

Re: Disk space limitation

It sounds like you want to set up a quota for these 2 users. YOu can limit the amount of space, but I don't know about limiting the number of files.

There are a number of quota commands. I recommend looking at the man pages for them all:

hercules: /exc/etc/scripts # man -k quota
edquota(1M) - edit user disk quotas
quota(1) - display disk usage and limits
quota(5) - disk quotas
quotacheck (generic)(1M) - file system quota consistency checker
quotacheck (hfs)(1M) - quota consistency checker for HFS file systems
quotacheck(1M) - VxFS file system quota consistency checker
quotactl(2) - manipulate disk quotas
quotaon, quotaoff(1M) - turn HFS file system quotas on and off
repquota(1M) - summarize file system quotas
rquotad(1M) - remote quota server
Jonathan Caplette
Regular Advisor

Re: Disk space limitation

Ok thanks a lot guys..

I'm gonna check to put some quota...

ChoW!
Jo
Sanjay_6
Honored Contributor

Re: Disk space limitation

Hi Jonathan,

you should have a look at the quota thing. This will limit the amount of disk space allocated to a particular user. You cannot limit the no of files in a directory,

Try this link below,

http://docs.hp.com/cgi-bin/fsearch/framedisplay?top=/hpux/onlinedocs/B2355-90742/B2355-90742_top.html&con=/hpux/onlinedocs/B2355-90742/00/00/49-con.html&toc=/hpux/onlinedocs/B2355-90742/00/00/49-toc.html&searchterms=quota&queryid=20020110-084950

Look for "Setting Up and Turning On Disk Quotas "

Hope this helps.

Regds
Thierry Poels_1
Honored Contributor

Re: Disk space limitation

hi,

I haven't used quotas for quite some time, but if I recall correctly quota will only take into account files OWNED by the user. If the user is "smart" or evil enough to chown some of his (large) files, he will not be stopped by quota. So to play safe chown should be disabled (setprivgrp).

regards,
Thierry.
All unix flavours are exactly the same . . . . . . . . . . for end users anyway.