LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   quotas for folders? (https://www.linuxquestions.org/questions/linux-newbie-8/quotas-for-folders-747546/)

ranjitcool 08-14-2009 09:53 AM

quotas for folders?
 
Hey Guys,

I have a question, did some googling didnt help much!

We have a system where every user account gets his/her own www.site.com/~username and their ftp directory to store stuff.

How do I enable quotas and limit their directory stuff to 10 mb?

As in when a user tried to upload stuff in his directory like a file more than 10mb he must be stopped.

Please assist.

Thanks
RJ

neonsignal 08-15-2009 07:48 AM

Have a look at the quota package (which contains tools to manage the quota limits). The quota option is typically already enabled in the kernel.

There are howtos at The Linux Documentation Project and at the YoLinux site.

centosboy 08-15-2009 09:40 AM

Quote:

Originally Posted by ranjitcool (Post 3643265)
Hey Guys,

I have a question, did some googling didnt help much!

We have a system where every user account gets his/her own www.site.com/~username and their ftp directory to store stuff.

How do I enable quotas and limit their directory stuff to 10 mb?

As in when a user tried to upload stuff in his directory like a file more than 10mb he must be stopped.

Please assist.

Thanks
RJ


install the quota package.
Code:

yum install quota
remount the given drive with the usrquota or/and grpquota flag or for
Code:

mount -o remount,usrquota  partition
permanent change -- edit fstab to add usrquota to the relevant drive/partition
turn quotas on.
Code:

quotaon -a
set the allowed quotas.

Code:

edquota -u user


or

Code:

setquota -u user
check all quotas

Code:

requota -a
check one users quota

Code:

quota -u user

anything else u wanna know, just ask


....

centosboy 08-16-2009 05:42 AM

oh i forgot 1 bit...

after you turn on quotas, and before you set quotas for any user, run


Code:

quotacheck -avug
this creates the systems disk qutoa files


All times are GMT -5. The time now is 06:13 PM.