You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "dino ierl (JIRA)" <ji...@apache.org> on 2011/07/04 16:01:22 UTC

[jira] [Commented] (VFS-280) Can not put with sfto

    [ https://issues.apache.org/jira/browse/VFS-280?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13059443#comment-13059443 ] 

dino ierl commented on VFS-280:
-------------------------------

I have run into the same problem. 

It appears to be directory related.

So basically you need to specify the directory name in the sftp command where you expect the data to be put

So instead of the following:

"sftp://username:password@ipaddress/"

You need the following:

"sftp://username:password@ipaddress/home/otherdirectory"

When the directory is specified the problem goes away.

> 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.
For more information on JIRA, see: http://www.atlassian.com/software/jira