Apache Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationApache Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old June 10th, 2001, 05:23 PM
Vano Vano is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2001
Posts: 5 Vano User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question Virtual Hosting Quota

I have virtual hosting in my apache system so that each user gets a directory in the form of www.domainname.com and inside has his/her website.

Is there any way to have quotas on these directories without using the linux kernel quota system which monitors users and not directories ?

Any ideas how I can implement a quota system without recurring to having unix users for my users ?

Thanks.

Reply With Quote
  #2  
Old June 10th, 2001, 07:08 PM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Write a script and do du -sH and run it from cron. Lock the account by chmod'ing the directory to the appropriate permission if you need hard quota. Anyhow, this method is possible but really not the right approach. You really should implement kernel quota.

Reply With Quote
  #3  
Old June 16th, 2001, 09:23 PM
bizzk's Avatar
bizzk bizzk is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2001
Location: The Netherlands
Posts: 327 bizzk User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
Hi,

How can I set a quotum at a certain directory which applies for all users (even root). For example, I want a certain directory to be less then 50 mb and I set a quotum at 50 mb.

It doesn't matter how, but it isn't a one time job so it should be easy or it should be automated by a script.

Thanks, Bizzk

Reply With Quote
  #4  
Old June 16th, 2001, 10:37 PM
Vano Vano is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2001
Posts: 5 Vano User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Unhappy

If you find any way to solve this problem (apart from using du in a cron ) let me know please. Thanks!

Reply With Quote
  #5  
Old June 18th, 2001, 06:17 AM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
>> If you find any way to solve this problem (apart from using du in a cron )

Really, if you don't want to use kernel quota, you just can't get away from not using du or other scripting language that implement du.

It's not too difficult to write such script at all. Just du the appropraite directories and when a particular soft quota is reached, send the user an email and remind him his account is currently over the quota or so. Just run this script per minute from cron.

Reply With Quote
  #6  
Old June 18th, 2001, 08:22 AM
bizzk's Avatar
bizzk bizzk is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2001
Location: The Netherlands
Posts: 327 bizzk User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
And how does the kernel quota thing work?

Reply With Quote
  #7  
Old June 18th, 2001, 03:24 PM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
>> And how does the kernel quota thing work?

Please RTFM of quota.

Reply With Quote
  #8  
Old June 18th, 2001, 03:40 PM
bizzk's Avatar
bizzk bizzk is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2001
Location: The Netherlands
Posts: 327 bizzk User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
I am sorry, I am not the kind of person who asks stuff which is well documented. I searched for it in my Linux books but I couldn't find anything about it.

Where can I find an online manual? Please give me a link, meanwhile a will take a search on google/the linux documentation project site.

Bizzk

Reply With Quote
  #9  
Old June 18th, 2001, 03:55 PM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Not trying to be rude by saying RTFM. Yes, search google about quota (just quota). Once you know how quota works, implementing quota to Apache is plain easy. No Apache specific is needed. Really, find out how quota works.

Reply With Quote
  #10  
Old June 18th, 2001, 04:09 PM
bizzk's Avatar
bizzk bizzk is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2001
Location: The Netherlands
Posts: 327 bizzk User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
I will do that.

Bizzk

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationApache Development > Virtual Hosting Quota


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT