Skip to content
This repository was archived by the owner on Feb 26, 2025. It is now read-only.
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

@thomascollett

Description

@thomascollett

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);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions