LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-14-2009, 10:53 AM   #1
ranjitcool
LQ Newbie
 
Registered: Dec 2006
Posts: 11

Rep: Reputation: 0
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
 
Old 08-15-2009, 08:48 AM   #2
neonsignal
Senior Member
 
Registered: Jan 2005
Location: Melbourne, Australia
Distribution: Debian Jessie (Fluxbox WM)
Posts: 1,387
Blog Entries: 52

Rep: Reputation: 355Reputation: 355Reputation: 355Reputation: 355
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.

Last edited by neonsignal; 08-15-2009 at 08:50 AM.
 
Old 08-15-2009, 10:40 AM   #3
centosboy
Senior Member
 
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137

Rep: Reputation: 116Reputation: 116
Quote:
Originally Posted by ranjitcool View Post
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


....
 
Old 08-16-2009, 06:42 AM   #4
centosboy
Senior Member
 
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137

Rep: Reputation: 116Reputation: 116
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
find -exec command to recursively delete files and folders in folders with X name Joan Murt Linux - Newbie 2 07-08-2009 05:35 PM
change permissions of all folders and sub folders cad Linux - General 3 01-28-2007 11:21 AM
quotas help venki Linux - Newbie 2 12-08-2006 03:20 PM
symlinks from folders to folders? vbsaltydog Linux - Newbie 4 04-03-2006 02:51 PM
Samba can create new files and folders but access denied in any new folders k.king Linux - Networking 2 01-15-2006 07:14 AM


All times are GMT -5. The time now is 07:12 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration