Attempt to copy a file via FTP will cause temporary lockup and create 0 byte 
file
---------------------------------------------------------------------------------

                 Key: VFS-176
                 URL: https://issues.apache.org/jira/browse/VFS-176
             Project: Commons VFS
          Issue Type: Bug
    Affects Versions: 1.0
         Environment: FtpFileSystem
            Reporter: Andrew Franklin
            Priority: Minor


The following exception occurred when I tried transferring a file via ftp that 
the user did not have read access to. (ie, it has been chmod 400 to another 
user).

Commons-vfs will create a 0 byte file in the destination folder, but that file 
never grows. Also, no messages are logged at
this time. So it appears to the user that the transfer has frozen, until the 
exception is thrown.

I suspect the problem is in commons-net.

Note: this exception is not thrown immediately. It takes a few minutes before 
this fires.

Caused by: org.apache.commons.vfs.FileSystemException: Could not copy 
"ftp://anonymous:[EMAIL PROTECTED]/pub/20070727.txt" to 
"file:///tmp/2007/10/20071011/pub/20070727.txt".
        at 
org.apache.commons.vfs.provider.AbstractFileObject.copyFrom(AbstractFileObject.java:933)
        at com.company.FileObjectUtil.copyFile(FileObjectUtil.java:260)
        at com.company.vfs.VfsFileMirror.copyNewFile(VfsFileMirror.java:495)
        ... 7 more
Caused by: org.apache.commons.vfs.FileSystemException: Could not close the 
input stream for file "ftp://anonymous:[EMAIL PROTECTED]/pub/20070727.txt".
        at 
org.apache.commons.vfs.provider.DefaultFileContent$FileContentInputStream.close(DefaultFileContent.java:565)
        at org.apache.commons.vfs.FileUtil.writeContent(FileUtil.java:87)
        at org.apache.commons.vfs.FileUtil.copyContent(FileUtil.java:103)
        at 
org.apache.commons.vfs.provider.AbstractFileObject.copyFrom(AbstractFileObject.java:924)
        ... 9 more
Caused by: org.apache.commons.net.ftp.FTPConnectionClosedException: FTP 
response 421 received.  Server closed connection.
        at org.apache.commons.net.ftp.FTP.__getReply(FTP.java:321)
        at org.apache.commons.net.ftp.FTP.getReply(FTP.java:605)
        at 
org.apache.commons.net.ftp.FTPClient.completePendingCommand(FTPClient.java:1253)
        at 
org.apache.commons.vfs.provider.ftp.FTPClientWrapper.completePendingCommand(FTPClientWrapper.java:177)
        at 
org.apache.commons.vfs.provider.ftp.FtpFileObject$FtpInputStream.onClose(FtpFileObject.java:594)
        at 
org.apache.commons.vfs.util.MonitorInputStream.close(MonitorInputStream.java:125)
        at java.io.BufferedInputStream.close(BufferedInputStream.java:440)
        at 
org.apache.commons.vfs.util.MonitorInputStream.close(MonitorInputStream.java:115)
        at 
org.apache.commons.vfs.provider.DefaultFileContent$FileContentInputStream.close(DefaultFileContent.java:561)
        ... 12 more

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to