Can not put with sfto
---------------------

                 Key: VFS-280
                 URL: https://issues.apache.org/jira/browse/VFS-280
             Project: Commons VFS
          Issue Type: Bug
    Affects Versions: 1.0
            Reporter: Harry Greijer


Hi.

Server side:
I have a OpenSSH server on windowsserver 2003.
I use the local ftp server.

Client side:
I test connecting with filezilla client. That works just fine, Put and Get..

But when running on java side with: jsch-0.1.42.jar and commons-vfs-1.0.jar.
I get following error.
Why is that?

DEBUG - putFile: sftp://<myuserid/mypasswd>@<myserver>/AUTF8B.TXT
DEBUG - putFile: file:///C:/tmp/AUTF8B.TXT
DEBUG - putFile: sftp://<myuserid/mypasswd>@<myserver>/
org.apache.commons.vfs.FileSystemException: Could not copy 
"file:///C:/tmp/AUTF8B.TXT" to 
"sftp://<myuserid/mypasswd>@<myserver>/AUTF8B.TXT".
        at 
org.apache.commons.vfs.provider.AbstractFileObject.copyFrom(AbstractFileObject.java:902)
        at ftp.SecFTP.put(SecFTP.java:105)
        at ftp.SecFTP.put(SecFTP.java:74)
        at ftp.TestSecFTP.main(TestSecFTP.java:57)
        at ftp.TestSecFTP.main(TestSecFTP.java:47)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at net.ibs.integrator.util.ITRLauncher.callMain(ITRLauncher.java:56)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at net.ibs.integrator.util.ITRStart.callMain(ITRStart.java:61)
Caused by: org.apache.commons.vfs.FileSystemException: Could not close the 
output stream for file "sftp://<myuserid/mypasswd>@<myserver>/AUTF8B.TXT".
        at 
org.apache.commons.vfs.provider.DefaultFileContent$FileContentOutputStream.close(DefaultFileContent.java:599)
        at org.apache.commons.vfs.FileUtil.copyContent(FileUtil.java:107)
        at 
org.apache.commons.vfs.provider.AbstractFileObject.copyFrom(AbstractFileObject.java:893)
        ... 14 more
Caused by: org.apache.commons.vfs.FileSystemException: Unknown message with 
code "Permission denied".
        at 
org.apache.commons.vfs.provider.sftp.SftpFileObject$SftpOutputStream.onClose(SftpFileObject.java:433)
        at 
org.apache.commons.vfs.util.MonitorOutputStream.close(MonitorOutputStream.java:63)
        at java.io.FilterOutputStream.close(FilterOutputStream.java:143)
        at 
org.apache.commons.vfs.util.MonitorOutputStream.close(MonitorOutputStream.java:53)
        at 
org.apache.commons.vfs.provider.DefaultFileContent$FileContentOutputStream.close(DefaultFileContent.java:595)
        ... 16 more
Caused by: 3: Permission denied
        at com.jcraft.jsch.ChannelSftp.throwStatusError(ChannelSftp.java:2289)
        at com.jcraft.jsch.ChannelSftp._put(ChannelSftp.java:485)
        at com.jcraft.jsch.ChannelSftp.put(ChannelSftp.java:439)
        at com.jcraft.jsch.ChannelSftp.put(ChannelSftp.java:406)
        at 
org.apache.commons.vfs.provider.sftp.SftpFileObject$SftpOutputStream.onClose(SftpFileObject.java:428)
        ... 20 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