Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Jul 2006 13:58:09 -0400
From:      Mikhail Teterin <mi+mx@aldan.algebra.com>
To:        "David J. Orman" <ormandj@corenode.com>
Cc:        isp@freebsd.org, net@freebsd.org
Subject:   Re: forcing FTP-uploaded files to be of certain types only
Message-ID:  <200607171358.09943.mi%2Bmx@aldan.algebra.com>
In-Reply-To: <c88eb16f1a0f.44bb4185@corenode.com>
References:  <200607171306.01882.mi%2Bmx@aldan.algebra.com> <c88eb16f1a0f.44bb4185@corenode.com>

next in thread | previous in thread | raw e-mail | index | archive | help
понед╕лок 17 липень 2006 13:51, David J. Orman написав:
> The stock ftp server? If you can't base the prohibitions on file extension
> alone (such as the 100kb example you made) then you're going to have to
> modify the source of the ftp daemon yourself. Size, extension, etc - those
> are relatively easy limits to impliment. Actual file typing by examination
> of the first 100kb isn't easy, and it isn't part of the core functionality
> AFAIK. You'll have to write that. In fact, I'm not aware of any ftp server
> that does what you're asking.

I was hoping for some sort of plugin-API for the server... Determining the 
file's type is not really hard -- file(1) does just that. I'm not looking to 
prevent _malicious_ users -- just the ignorant ones.

We don't mind LARGE files -- some of those are legitimate. We just want them 
to be compressed before being uploaded. In fact, checking for this is even 
easier, than the usual byte-sniffing done by file(1) -- just try to compress 
those first 100K. If the result is smaller than 50K, the whole gets 
rejected :-)

> Maybe it would be better to examine files periodically that were uploaded
> via a simple program, and anything that isn't allowed, destroy.

No, destruction is not an option :-)

> You could also make it compress things that weren't compressed to begin
> with, etc etc etc.

Yeah, and we are doing that now -- kind of. But I would like an educational 
message sent to the uploader instead: "Transfer aborted: please compress 
large files before uploading"...

	-mi



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200607171358.09943.mi%2Bmx>