Author |
|
tdonovan Moderator
Joined: 17 Dec 2005 Posts: 611 Location: Milford, MA, USA
|
Posted: Sat 12 May '07 2:15 Post subject: mod_ftp |
|
|
One of the Apache.org modules which isn't (quite) released yet is mod_ftp.
This new module makes Apache an FTP server as well as a web server.
I built mod_ftp for Apache 2.2.4 (Win32) and it is working surprisingly well for me so far!
If you are interested in mod_ftp, my build is at http://www.tomdonovan.net/download/Apache228_mod_ftp.zip .
Updated 21 March 2008, see below.
Use this module only with Apache 2.2.4 from Apache Lounge, not with the "stock" Apache from www.apache.org.
Since it is still unreleased, and not thoroughly field-tested yet, please use caution and test carefully.
Like mod_dav, mod_ftp is a read-write protocol - so you should set up some access controls before you open it up to the world.
The Allow/Deny directives work correctly with mod_ftp. All the mod_auth* directives should work with it too, but I haven't tried them myself.
If you try mod_ftp, it would be great if you could reply here and share your opinion of it.
-tom- |
|
Back to top |
|
Jorge
Joined: 12 Mar 2006 Posts: 376 Location: Belgium
|
Posted: Sat 12 May '07 13:22 Post subject: |
|
|
Small note: there is no virtual host support (yet?).
Pitty since if there was that would have been awsome |
|
Back to top |
|
tdonovan Moderator
Joined: 17 Dec 2005 Posts: 611 Location: Milford, MA, USA
|
Posted: Sat 12 May '07 15:21 Post subject: |
|
|
re: "there is no virtual host support "
Yes - named virtual hosts are a problem since there are no Host: headers in FTP
There was a good discussion of this a while ago on the Apache Dev list.
Apparently some other FTP servers can parse a username into a hostname + username.
If password authentication is used, the FTPHomeDir and FTPJailUser directives can be used instead of bona-fide virtual hosts.
This keeps individual users' directories strictly separated, but unfortunately it doesn't provide any way to organize users into groups with common group directories.
-tom- |
|
Back to top |
|
pmilano1
Joined: 21 Mar 2008 Posts: 2
|
Posted: Fri 21 Mar '08 13:40 Post subject: |
|
|
Just in terms of concepts, do we see this going in the direction of further integration?
For example, dynamic ftp repositories? Maybe with a cgi layer?
I have a rather large SAN of data that I dynamically serve, so that the SAN is not exposed. This works well with image streaming, but many users require the ability to ftp as well.
The ability to dynamically create file listings, and on the fly user rights would be a great way to go.
Thoughts? |
|
Back to top |
|
tdonovan Moderator
Joined: 17 Dec 2005 Posts: 611 Location: Milford, MA, USA
|
Posted: Fri 21 Mar '08 18:53 Post subject: |
|
|
I'm not sure what you mean.
mod_ftp does support content handlers, runs CGI programs, uses Apache authentication, etc.
It supports most of the things that the regular http protocol supports in Apache : DocumentRoot, Alias, etc.
If you want to try the current mod_ftp built with Visual Studio 2005 (for use with Apache 2.2.8 from Apache Lounge) you can download a copy from http://www.tomdonovan.net/download/Apache228_mod_ftp.zip
This was built from today's revision (639682) of the mod_ftp trunk, with a small typo fixed in ftp_commands.c (the function ftp_parse2 has a spurious "*t" in its definition). Edit: I entered Apache bug 44653 for this problem.
The docs are here.
Here's an example config section (you will need to create a C:\Apache2\ftproot directory): Code: | LoadModule ftp_module modules/mod_ftp.so
<IfModule ftp_module>
Listen 21
<VirtualHost *:21>
FTP on
FTPBannerMessage "FTP Server at %L"
DocumentRoot "C:/Apache2/ftproot"
<Directory "C:/Apache2/ftproot">
Options Indexes ExecCGI
Allow from all
</Directory>
</VirtualHost>
</IfModule>
|
Bear in mind that mod_ftp is still very "alpha" status, so I suggest you only use this module for experimenting and testing.
-tom-
Last edited by tdonovan on Fri 21 Mar '08 19:39; edited 2 times in total |
|
Back to top |
|
pmilano1
Joined: 21 Mar 2008 Posts: 2
|
Posted: Fri 21 Mar '08 19:25 Post subject: |
|
|
Hmmm.
Thanks for the response.
Oddly, I haven't gotten that impression from any writeups I have seen. Regardless, it may indeed be a fit if we're on the same page.
Essentially, I want the entire root to be virtualized based on the CGI.
I'll take a look at the document, perhaps I just hadn't stumbled on the right one yet.
Thanks again-
P |
|
Back to top |
|
tdonovan Moderator
Joined: 17 Dec 2005 Posts: 611 Location: Milford, MA, USA
|
Posted: Fri 21 Mar '08 19:46 Post subject: |
|
|
re: "I want the entire root to be virtualized based on the CGI"
hmmm.... I don't quite get it. The root is used to find a file, which - if it is a CGI - is executed to produce the result.
By the time you are executing a CGI and delivering the results to the client, the root has already been determined.
Since the root was needed to find the CGI file, I don't think a CGI can reset the root at this late point in the processing.
Perhaps you meant a module rather than a CGI, like mod_vhost_alias or mod_vhost_dbd.
-tom- |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7373 Location: Germany, Next to Hamburg
|
Posted: Sat 22 Mar '08 11:33 Post subject: Re: mod_ftp |
|
|
I found a compiled in VS6 so it runs fine with apache.org binaries
on gknw.net |
|
Back to top |
|
glsmith Moderator
Joined: 16 Oct 2007 Posts: 2268 Location: Sun Diego, USA
|
Posted: Sun 30 Mar '08 8:34 Post subject: |
|
|
tdonovan wrote: | with a small typo fixed in ftp_commands.c (the function ftp_parse2 has a spurious "*t" in its definition). Edit: I entered Apache bug 44653 for this problem. |
Thank you Tom
Wish I could figure these things out!
Gregg |
|
Back to top |
|
bentogoa
Joined: 09 Feb 2007 Posts: 66 Location: GOA
|
Posted: Sat 11 Jul '09 19:12 Post subject: |
|
|
@tdonovan
Do where i can download the win32 source for this mod |
|
Back to top |
|
glsmith Moderator
Joined: 16 Oct 2007 Posts: 2268 Location: Sun Diego, USA
|
|
Back to top |
|
bentogoa
Joined: 09 Feb 2007 Posts: 66 Location: GOA
|
Posted: Sun 12 Jul '09 8:05 Post subject: |
|
|
@ glsmith
Thanks
Does any know how to compile mod_ftp using VC 9 ? |
|
Back to top |
|
tdonovan Moderator
Joined: 17 Dec 2005 Posts: 611 Location: Milford, MA, USA
|
Posted: Sun 12 Jul '09 15:58 Post subject: |
|
|
If you have the full VC Visual Studio 2008 - you should be able to open mod_ftp.dsw and convert it to a VC9 solution/project.
If you are looking for a VC9 command-line build, try this:
* Setup your VC9 command-line build environment, as described here
* Set an APACHE environment variable to the location of your installed version of Apache 2.2, e.g: Code: | SET APACHE=C:\Apache2 |
* Change to the mod_ftp-0.9.2\modules\ftp directory and execute these three commands: Code: | COPY /Y NUL ftp_config.h
CL /LD /Femod_ftp.so /Zi /arch:SSE2 /I %APACHE%\include /I ..\..\include /O2 /MD /DWIN32 /DFTP_DECLARE_EXPORT /DFTP_APXS_BUILD /LD ftp_commands.c ftp_connection.c ftp_data_connection.c ftp_data_filters.c ftp_filters.c ftp_inet_pton.c ftp_limitlogin.c ftp_log.c ftp_message.c ftp_protocol.c ftp_request.c ftp_util.c mod_ftp.c /link /INCREMENTAL:NO %APACHE%\lib\libhttpd.lib %APACHE%\lib\libapr-1.lib %APACHE%\lib\libaprutil-1.lib wsock32.lib
MT -manifest mod_ftp.so.manifest -outputresource:mod_ftp.so;2
|
* Copy mod_ftp.so to your Apache \modules directory.-tom- |
|
Back to top |
|