PCTechTalkhttp://www.pctechtalk.com/forums/

Go Back   PCTechTalk > PC Tech > Operating Systems and Software > Linux

Reply
 
LinkBack Thread Tools Display Modes
Old 09-28-2004, 02:52 AM   #1 (permalink)
The Grim Reaper!
 
technobeast's Avatar
 
Join Date: May 2002
Location: Bulgaria
Posts: 2,387
technobeast will become famous soon enough technobeast will become famous soon enough
Folder size quota in FreeBSD?

I have N (certain count) folders in a FreeBSD server. And N users logging into their own folders (no local accounts web interface only - PHP script). Any idea how to give a folder size quotas for each of the folders? FreeBSD 5.1. Should this be done via FreeBSD or with the web interface - the script. I have root account to the server.
__________________
Liked this post and found it helpful? Click on the image under my avatar to add to my reputation


technobeast is offline   Reply With Quote
Old 09-28-2004, 11:10 AM   #2 (permalink)
Da House Nerd
 
greffov's Avatar
 
Join Date: Dec 1969
Location: One CPU Lane
Posts: 3,512
greffov will become famous soon enough
uhm. I don't get it.

Is this a filesystem quota problem? (are the users local unix users?) Or is this an application quota problem (virtual users, with virtual quotas)

I assume it's the latter, then you can do anything that your creativity feeds you to limit users in their usage.
__________________
Linux virusscanner detected a virus:
Windows 95 ... delete [Y/n] y
~
~

:wq
greffov is offline   Reply With Quote
Old 09-28-2004, 12:47 PM   #3 (permalink)
The Grim Reaper!
 
technobeast's Avatar
 
Join Date: May 2002
Location: Bulgaria
Posts: 2,387
technobeast will become famous soon enough technobeast will become famous soon enough
Yup it's the latter. The guy that made the software for our company couldn't do it via the script (site) and I have to figure out a way to do it with the OS. But since I don't have a real user access, with a web site and file manager (php script) to it, I was confused in searching a way to limit the quota.
__________________
Liked this post and found it helpful? Click on the image under my avatar to add to my reputation


technobeast is offline   Reply With Quote
Old 09-28-2004, 01:34 PM   #4 (permalink)
Da House Nerd
 
greffov's Avatar
 
Join Date: Dec 1969
Location: One CPU Lane
Posts: 3,512
greffov will become famous soon enough
you can't do it with the OS. just do it with PHP.

It's a bit ugly and expensive, but you can call du -s <dir_root> and parse the output (in bytes) such that you do not allow more uploading, etc. when the value exceeds a soft limit. You have to see whether it is too slow or not, either use a database to keep track of the files and their sizes (SELECT sum(size) FROM files WHERE owner=$userid; you get the point)
__________________
Linux virusscanner detected a virus:
Windows 95 ... delete [Y/n] y
~
~

:wq
greffov is offline   Reply With Quote
Reply

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT -5. The time now is 07:08 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
2001 PCTechTalk