Skip to content

[Bug]: s3 backend does not work with sftpgo portable #1948

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
2 tasks done
pg83 opened this issue Apr 9, 2025 · 2 comments
Open
2 tasks done

[Bug]: s3 backend does not work with sftpgo portable #1948

pg83 opened this issue Apr 9, 2025 · 2 comments
Labels
support request request for free support. Check out our support policy

Comments

@pg83
Copy link

pg83 commented Apr 9, 2025

⚠️ This issue respects the following points: ⚠️

  • This is a bug, not a question or a configuration issue.
  • This issue is not already reported on Github (I've searched it).

Bug description

I have minio installed on http://10.0.0.64:8012/

On server side:

/var/run/ci/std # sftpgo portable --s3-bucket geesefs --s3-endpoint http://10.0.0.64:8012/ --s3-access-key qwerty --s
3-access-secret qwerty123 --password qwerty123 --username anon --sftpd-port 9090 --fs-provider s3fs
2025-04-09T13:25:16.026 INF Portable mode ready, user: "anon", password: "[redacted]", public keys: [], directory: "", permissions: map[/:[list download]], file patterns filters: [] SFTP port: 9090

On client side:

pg$ sftp -P 9090 anon@10.0.0.64
(anon@10.0.0.64) Password:
Connected to 10.0.0.64.
sftp> ls
Couldn't read directory: Failure
sftp>

With no logs on server side.

Steps to reproduce

Expected behavior

list of objects from my minio bucket

SFTPGo version

SFTPGo 2.6.0 +metrics +azblob +gcs +s3 +bolt +mysql +pgsql +sqlite -unixcrypt +portable

Data provider

s3

Installation method

Other

Configuration

config

Relevant log output

2025-04-09T13:25:16.026 INF Portable mode ready, user: "anon", password: "[redacted]", public keys: [], directory: "", permissions: map[/:[list download]], file patterns filters: [] SFTP port: 9090

What are you using SFTPGo for?

Private user, home usecase (home backup/VPS)

Additional info

--directory works just fine

@pg83 pg83 added the bug Something isn't working label Apr 9, 2025
@drakkan drakkan added support request request for free support. Check out our support policy and removed bug Something isn't working labels Apr 15, 2025
@martencassel
Copy link

martencassel commented Apr 18, 2025

Try setting the s3-region option for sftpgo.

This option is mandatory on the sftpgo command line, but not treated as such in the CLI.

Its possible to not set it, and it will generate an error at runtime when sftpgo initializing the s3 client.

For minio the default region is us-east-1

    --s3-region us-east-1 \

Here is the complete command

sftpgo portable \
    --s3-bucket geesefs \
    --s3-endpoint http://10.0.0.64:8012/ \
    --s3-region us-east-1 \
    --s3-access-key qwerty123 \
    --s3-access-secret qwerty123 \
    --password qwerty123 \
    --username anon \
    --sftpd-port 9090 \
    --fs-provider s3fs

Reading the docs its referenced here:

1. S3 Compatible Object Storage Backends

https://github.com/sftpgo/docs/blob/3532d4f5b26e7e6983036ca06442757e4df25979/docs/s3.md?plain=1#L3

2. S3 Region Configuration Option

https://github.com/sftpgo/docs/blob/3532d4f5b26e7e6983036ca06442757e4df25979/docs/cli.md?plain=1#L181

@pg83
Copy link
Author

pg83 commented Apr 18, 2025

Try setting the s3-region option for sftpgo.

Still the same. But behavior has changed somewhat. Previously, the error was given instantly, but now it takes a few seconds.

Is there a way to get some kind of debugging log into the console?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
support request request for free support. Check out our support policy
Projects
None yet
Development

No branches or pull requests

3 participants