commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Schild <a.sch...@aarboard.ch>
Subject [vfs] Inaccessible rootdir, how to access
Date Wed, 02 Nov 2011 14:40:55 GMT
Hello,

we have to retrieve files from a ftp server which has this structure:

ftp://user:password@serverip/user/folder1/

The users don't have access to / directory of the server

So normal connect to "ftp://user:password@serverip/user/folder1/"
does not work and fails with

Caused by: org.apache.commons.vfs2.FileSystemException: Could not change 
to work directory "/".
         at 
org.apache.commons.vfs2.provider.ftp.FtpClientFactory.createConnection(FtpClientFactory.java:130)
         ... 11 more


For working arround the problem there exists this option in the ftp 
provider:

FtpFileSystemConfigBuilder.getInstance().setUserDirIsRoot(opts, true);

With this the login works fine "ftp://user:password@serverip/folder1/"
, and even a getChildren() lists all children of the folder1.

But when I then try to retrieve the files, the ftp servers tells me that 
it can't find the
requested files.
And the requested URL is: ftp://user:password@serverip/folder1/file1
instead of the correct ftp://user:password@serverip/user/folder1/file1

Any ideas how I could solve that problem ?
I did not find any such problems in the list archives.

BTW: The ftp server software is:  ProFTPD 1.3.3c

André

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message