kahing / goofys

a high-performance, POSIX-ish Amazon S3 file system written in Go
Apache License 2.0
5.18k stars 521 forks source link

Mount 3rd party S3 provider #652

Open bodomic2 opened 3 years ago

bodomic2 commented 3 years ago

Hi guys, can't find any details on how to customize a random S3 proivder to use Goofys with it. Provider gave me ~/.aws/config that sets up all the environment - and aws-cli works perfectly with it. I've dumbly assumed goofys would read and use it but it definitely does not. Full config below.

# cat ~/.aws/config
[plugins]
endpoint = awscli_plugin_endpoint

[default]
region = nl-ams
s3 =
  endpoint_url = https://s3.nl-ams.scw.cloud
  signature_version = s3v4
  max_concurrent_requests = 100
  max_queue_size = 1000
  multipart_threshold = 50MB
  # Edit the multipart_chunksize value according to the file sizes that you want to upload. The present configuration allows to upload files up to 10 GB (100 requests * 10MB). For example setting it to 5GB allows you to upload files up to 5TB.
  multipart_chunksize = 10MB
s3api =
  endpoint_url = https://s3.nl-ams.scw.cloud
# cat /etc/fstab
...
goofys#letsencrypt /mnt/acme fuse _netdev,allow_other,--file-mode=0644,--dir-mode=0755 0 0
# mount /mnt/acme
2021/08/15 09:38:19.979904 main.FATAL Unable to mount file system, see syslog for details
# tail /var/log/syslog
...
Aug 15 09:38:18 myhost /usr/local/bin/goofys[369238]: s3.INFO Switching from region 'us-east-1' to 'eu-west-1'
Aug 15 09:38:18 myhost /usr/local/bin/goofys[369238]: main.ERROR Unable to access 'letsencrypt': permission denied
Aug 15 09:38:18 myhost /usr/local/bin/goofys[369238]: main.FATAL Mounting file system: Mount: initialization failed

So it definitely targets for the main AWS S3, gets region redirect and fails permissions (because I need a different cloud provider)

mathematicalmichael commented 2 years ago

see https://github.com/kahing/goofys/issues/388