Skip to content
This repository was archived by the owner on Feb 26, 2025. It is now read-only.

Unable to change directories when exposed via Mina SFTP #94

Open
thomascollett opened this issue Jan 25, 2018 · 0 comments · May be fixed by #96
Open

Unable to change directories when exposed via Mina SFTP #94

thomascollett opened this issue Jan 25, 2018 · 0 comments · May be fixed by #96

Comments

@thomascollett
Copy link

thomascollett commented Jan 25, 2018

When using s3fs as a file system for Mina SFTP, i'm unable to change directory (cd):

sftp> ls -l
d---------   1 OWNER@   GROUP@          0 Jan 25 10:51 bar
d---------   1 OWNER@   GROUP@          0 Jan 25 10:42 foo
sftp> cd foo
Can't change directory: Can't check target

POSIX permissions are not being returned for these directories, which is causing an exception in the SFTP client when attempting to cd to the directory. This is fixed by:
#96

Versions:

<dependencies>
      <dependency>
        <groupId>org.apache.sshd</groupId>
        <artifactId>sshd-core</artifactId>
        <version>1.6.0</version>
      </dependency>   

      <dependency>
        <groupId>com.upplication</groupId>
        <artifactId>s3fs</artifactId>
        <version>2.2.1</version>
      </dependency>
</dependencies>

My file system factory looks like:

FileSystem fileSystem = FileSystems.newFileSystem(
  URI.create("s3://s3-eu-west-1.amazonaws.com/"),
  ImmutableMap.of(),
  Thread.currentThread().getContextClassLoader());

Path bucketPath = fileSystem.getPath("/" + bucketName + "/");
return new VirtualFileSystemFactory(bucketPath);
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant