I am writing an application that uses VFS to implement the FTP operations.
I have found that the VFS implementation (commons-vfs2-2.0.jar)) relies
on the List permission on the remote directory structure.
For example, if I am FTPing a file to a remote dir "uploads", then on
the remote system, the <ftpUserHome> that already contains a
subdirectory called "uploads", does require List privilege. This is
targeting FileZilla Server (0.9.41 beta) on Windows 7.
If List privilege is not granted then the following exception is raised:-
Caused by: org.apache.commons.vfs2.FileSystemException: Could not create
folder "ftp://myLaptop/upload".
at
org.apache.commons.vfs2.provider.AbstractFileObject.createFolder(AbstractFileObject.java:999)
at
org.apache.commons.vfs2.provider.AbstractFileObject.getOutputStream(AbstractFileObject.java:1424)
at
org.apache.commons.vfs2.provider.DefaultFileContent.getOutputStream(DefaultFileContent.java:461)
at
org.apache.commons.vfs2.provider.DefaultFileContent.getOutputStream(DefaultFileContent.java:441)
at org.apache.commons.vfs2.FileUtil.copyContent(FileUtil.java:111)
at
org.apache.commons.vfs2.provider.AbstractFileObject.copyFrom(AbstractFileObject.java:1053)
... 24 more
Caused by: org.apache.commons.vfs2.FileSystemException: Could not create
FTP directory "ftp://myLaptop/upload".
at
org.apache.commons.vfs2.provider.ftp.FtpFileObject.doCreateFolder(FtpFileObject.java:544)
at
org.apache.commons.vfs2.provider.AbstractFileObject.createFolder(AbstractFileObject.java:988)
If the remote file does exist, then the exception is not raised even
when List privilege is not granted to the <ftpUserHome> directory.
List privilege is not needed when using a command-line FTP client.
Is this a known issue or restriction?
Thanks in advance
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]