You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Serge (JIRA)" <ji...@apache.org> on 2016/06/25 19:10:37 UTC

[jira] [Updated] (VFS-616) SftpFileSystem does cd / in getChannel and fails due to lack of permissions

     [ https://issues.apache.org/jira/browse/VFS-616?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Serge updated VFS-616:
----------------------
    Priority: Major  (was: Critical)

> SftpFileSystem does cd / in getChannel and fails due to lack of permissions
> ---------------------------------------------------------------------------
>
>                 Key: VFS-616
>                 URL: https://issues.apache.org/jira/browse/VFS-616
>             Project: Commons VFS
>          Issue Type: Bug
>    Affects Versions: 2.0, 2.1
>            Reporter: Serge
>
> with setUserDirIsRoot(false) in options:
> StandardFileSystemManager manager = new StandardFileSystemManager();  manager.setCacheStrategy(org.apache.commons.vfs2.CacheStrategy.MANUAL);
> manager.init();
> manager.resolveFile(localFile).copyFrom(manager.resolveFile("sftp://aaa@localhost/test/test2", options)
> fails because user aaa doesn't have permissions to cd / but the same user has all permissions to read /test/test2
> cd /  is at org.apache.commons.vfs2.provider.sftp.SftpFileSystem.getChannel(SftpFileSystem.java:139)
> 	  at org.apache.commons.vfs2.provider.sftp.SftpFileObject.statSelf(SftpFileObject.java:151)
> 	  at org.apache.commons.vfs2.provider.sftp.SftpFileObject.doGetType(SftpFileObject.java:114)
> 	  at org.apache.commons.vfs2.provider.AbstractFileObject.getType(AbstractFileObject.java:496)
> 	  - locked <0x59a6> (a org.apache.commons.vfs2.provider.sftp.SftpFileSystem)
> 	  at org.apache.commons.vfs2.provider.AbstractFileObject.exists(AbstractFileObject.java:477)
> 	  at org.apache.commons.vfs2.provider.AbstractFileObject.copyFrom(AbstractFileObject.java:1013)
> $ sftp aaa@localhost
> Connected to localhost.
> sftp> cd /
> Couldn't stat remote file: No such file or directory
> sftp> ls /test/test2
> /test/test2
> sftp> get /test/test2
> Fetching /test/test2



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)