PDA

View Full Version : [Filled] Disallow uploading if hd space is < xxx MB


Unique
04-03-2003, 05:28 PM
Would be cool to implement such option.

Specially since current version tries opening a connection even if 0 kb is free and craps out with a data channel in use error instead of hd space full error.

And youd have to implement some hd free check anywayz id be nice to have an option to disallow upping if hd only has xxx meg free or so :)
So the OS still has room to swap files at any time.

Sounds ok or ? :D

darkone
04-16-2003, 07:32 AM
This could be done as 'pre' upload script... but I'll add it on my todo list

iono-
04-19-2003, 09:32 AM
yeah this feature is required.

Unique
10-19-2003, 05:20 AM
How far is it still down on your todo list?
:D

Caleb
10-23-2003, 07:03 AM
Yeah ioFTPD could check if there's enough HD space for the upcoming file, and not die in the middle of upload.

This feature is much wanted, and it's very logical to have sucn a thing.

Of course scripts can check if there's enough space once they get the .sfv.. but that's an other story.

dasOp
10-23-2003, 07:16 AM
Guess what? Clients dont specify how large a file is.

So, to do this you have to set a reasonable value to check for. Easy if you deal with standard rars, where files arent larger than 50mb. Harder if you allow direct uploads of bin/cue. Then you'd have to assume 700mb free. And what if its a 3cd rel? Kinda useless getting one outta 3 cd's. So suddenly you have to reserve 2.1gb.

This is a script thing for sure.

EwarWoo
10-23-2003, 07:46 AM
Well, wouldn't need to get that fussy.
Just specify x ammount with x a user definable for largest file u carry.
The main thing is to stop it running out mid file upload. Mid release is ok, u can finish later, but if files are coming up as 0-bytes its a pain in ass cleaning up.
Personally would adore this feature and would set to 60mb or so :)

Unique
10-23-2003, 09:14 AM
reserve 2.1 gb? i just want to put a limit on 200 meg or so so my os and other progs always have space left to swap
Frankly i dont give a shit if a upload gets incomplete then. if its full its full...

Using warchive to check space and auto wipe atm, but still think it be nice to implement in the daemon. I dont like scripts for basic features :/

Mouton
10-23-2003, 09:50 AM
Attached: sC.exe

Usage:
[Pre]
stor = %EXEC ..\scripts\sC.exe %[$path] 50

...to disallow upload when less than 50 MBytes are left on the drive.

Result:

[10:48:33] [L] STOR test.map
[10:48:33] [L] 550 Out of disk space.
[10:48:33] Transfer Failed!

http://www.ioftpd.com/scripts/script.php?id=43

Unique
10-23-2003, 10:11 AM
mhm 1 question mouton, i see your using a exe file for this.
Doesnt io only cache tcl scripts?
So if using .exe scripts the hd will always have to seek and boot it up on each file? Or will this exe be cached too :)
Either way thanks for the script Mouton! :)

luke2k4
04-09-2004, 10:56 AM
hi

one question to this nice script

my ioFTPD folder is c:\root\ioFTPD but the hd to save is d:\site

so how can i use this tool because it checks hdd space on c:\ and not on drive d:\ ?!

greets

Zer0Racer
04-09-2004, 02:26 PM
luke2k4,

[FTP_Pre-Command_Events]
stor = %EXEC ..\scripts\sC.exe %[$path] 50

The cookie %[$path] will translate into whatever physical path file is going to be uploaded in. So if you upload to ie. d:\site the script will check free space on that disk.

luke2k4
04-09-2004, 02:31 PM
but i´ve 4 gigs free on c:\ and i want to set the limit to 6 gigs! that means that i cant write to c:\ anymore..... thats the problem u know ?!

neoxed
04-09-2004, 04:43 PM
Originally posted by luke2k4
but i´ve 4 gigs free on c:\ and i want to set the limit to 6 gigs! that means that i cant write to c:\ anymore..... thats the problem u know ?!

You cannot define different minimum space values for different drives (at least with the current version). The same value is used for all drives.

luke2k4
04-09-2004, 04:53 PM
k thats all i wanna know

EwarWoo
04-10-2004, 07:17 AM
Great little script, cheers for that :)

freak007
04-18-2004, 05:12 AM
Does SC.exe support pathes with Spaces in it ?

Thx for answer

Freak007

luke2k4
04-18-2004, 01:48 PM
yup it does :D

Ofloo
05-23-2004, 09:55 PM
not supported on nt4 it hangs and creates fake users after while no one can login anymore ..

also hangs when enought space is availlable (stor hangs..) besides that great script.