You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ftpserver-users@mina.apache.org by Marian Aldenhövel <ma...@mba-software.de> on 2009/04/21 12:25:15 UTC
FileSystems explained
Hi,
I am just playing around with Apache FtpServer. My plan is to integrate
it into a spring-based webapplication as a means to exchange files like
firmware-updates for client-software with embedded clients that are
distributed in the field.
I like the idea of having that server running in the same application
context and not alongside it for things like common logins, common
logging, tracking of transaction etc. I think FtpServer would be
perfectly suited to my needs.
So far I got the basic integration going, including a context listener
to start() and stop() the server and a custom UserManager to link to the
security infrastructure already in place.
Very nice. I can now log in using a ftp client!
But I can't figure out what my server is actually serving and how to
control that. I have not explicitly set up any filesystem-related
options, my context-file for setup is attached. I suspect that is
actually the problem. So here is the question:
How do I setup the filesystem?
I am running FtpServer 1.0.0 on Windows. Developing my application in
and around Spring 2.5. The IDE is Eclipse 3.3 but I doubt that that
matters. Any other relevant information I would be happy to provide.
When I connect to the server using Filezilla as a client the client
complains that it cannot list the directory while the server logs this:
>WARN [org.apache.ftpserver.listener.nio.FtpLoggingFilter] - SENT: 331
User name okay, need password for admin.
>INFO [org.apache.ftpserver.listener.nio.FtpLoggingFilter] - RECEIVED:
OPTS UTF8 ON
>WARN [org.apache.ftpserver.listener.nio.FtpLoggingFilter] - SENT: 230
User logged in, proceed.
>INFO [org.apache.ftpserver.listener.nio.FtpLoggingFilter] - RECEIVED: PWD
>WARN [org.apache.ftpserver.listener.nio.FtpLoggingFilter] - SENT: 200
Command OPTS okay.
>INFO [org.apache.ftpserver.listener.nio.FtpLoggingFilter] - RECEIVED:
TYPE I
>WARN [org.apache.ftpserver.listener.nio.FtpLoggingFilter] - SENT: 257
"/" is current directory.
>INFO [org.apache.ftpserver.listener.nio.FtpLoggingFilter] - RECEIVED: PASV
>DEBUG [org.apache.ftpserver.impl.IODataConnectionFactory] - Initiating
passive data connection
>DEBUG [org.apache.ftpserver.impl.IODataConnectionFactory] - Opening
passive data connection on address "/127.0.0.1" and port 0
>DEBUG [org.apache.ftpserver.impl.IODataConnectionFactory] - Passive
data connection created on address "/127.0.0.1" and port 0
>WARN [org.apache.ftpserver.listener.nio.FtpLoggingFilter] - SENT: 200
Command TYPE okay.
>INFO [org.apache.ftpserver.listener.nio.FtpLoggingFilter] - RECEIVED: LIST
>DEBUG [org.apache.ftpserver.command.impl.LIST] - Listing on a
non-existing file
>WARN [org.apache.ftpserver.listener.nio.FtpLoggingFilter] - SENT: 227
Entering Passive Mode (127,0,0,1,6,211)
>WARN [org.apache.ftpserver.listener.nio.FtpLoggingFilter] - SENT: 450
Non-existing file
I also tried to create a directory, hoping it would show me where it was
trying to do so:
>INFO [org.apache.ftpserver.listener.nio.FtpLoggingFilter] - RECEIVED:
MKD AAAA
>DEBUG [org.apache.ftpserver.filesystem.nativefs.impl.NativeFtpFile] -
Checking authorization for /AAAA
>DEBUG [org.apache.ftpserver.filesystem.nativefs.impl.NativeFtpFile] -
Checking if file exists
>DEBUG [org.apache.ftpserver.filesystem.nativefs.impl.NativeFtpFile] -
Authorized
>DEBUG [org.apache.ftpserver.filesystem.nativefs.impl.NativeFtpFile] -
Checking authorization for /AAAA
>DEBUG [org.apache.ftpserver.filesystem.nativefs.impl.NativeFtpFile] -
Checking if file exists
>DEBUG [org.apache.ftpserver.filesystem.nativefs.impl.NativeFtpFile] -
Authorized
>INFO [org.apache.ftpserver.listener.nio.FtpLoggingFilter] - RECEIVED:
MKD /AAAA
>DEBUG [org.apache.ftpserver.filesystem.nativefs.impl.NativeFtpFile] -
Checking authorization for /AAAA
>DEBUG [org.apache.ftpserver.filesystem.nativefs.impl.NativeFtpFile] -
Checking if file exists
>DEBUG [org.apache.ftpserver.filesystem.nativefs.impl.NativeFtpFile] -
Authorized
>DEBUG [org.apache.ftpserver.filesystem.nativefs.impl.NativeFtpFile] -
Checking authorization for /AAAA
>DEBUG [org.apache.ftpserver.filesystem.nativefs.impl.NativeFtpFile] -
Checking if file exists
>DEBUG [org.apache.ftpserver.filesystem.nativefs.impl.NativeFtpFile] -
Authorized
>WARN [org.apache.ftpserver.listener.nio.FtpLoggingFilter] - SENT: 550
Can't create directory /AAAA.
>INFO [org.apache.ftpserver.listener.nio.FtpLoggingFilter] - RECEIVED: PASV
>DEBUG [org.apache.ftpserver.impl.IODataConnectionFactory] - Initiating
passive data connection
>DEBUG [org.apache.ftpserver.impl.IODataConnectionFactory] - Opening
passive data connection on address "/127.0.0.1" and port 0
>DEBUG [org.apache.ftpserver.impl.IODataConnectionFactory] - Passive
data connection created on address "/127.0.0.1" and port 0
>WARN [org.apache.ftpserver.listener.nio.FtpLoggingFilter] - SENT: 550
Can't create directory /AAAA.
Ciao, MM
Re: FileSystems explained
Posted by Niklas Gustavsson <ni...@protocol7.com>.
On Tue, Apr 21, 2009 at 12:25 PM, Marian Aldenhövel
<ma...@mba-software.de> wrote:
> But I can't figure out what my server is actually serving and how to control
> that. I have not explicitly set up any filesystem-related options, my
> context-file for setup is attached. I suspect that is actually the problem.
> So here is the question:
The file system defaults to a native file system. The home directory
is to be provided per user, so that should come from your custom
UserManager. Now, where are you planning to serve the files from (a
normal file system, database, something else)?
/niklas