s3fs-fuse / s3fs-fuse

FUSE-based file system backed by Amazon S3
GNU General Public License v2.0
8.69k stars 1.02k forks source link

Unable to mount S3 bucket #1659

Open uneewk opened 3 years ago

uneewk commented 3 years ago

Version of s3fs being used (s3fs --version)

Amazon Simple Storage Service File System V1.82(commit:unknown) with GnuTLS(gcrypt)

Version of fuse being used (pkg-config --modversion fuse, rpm -qi fuse, dpkg -s fuse)

Package: fuse Status: install ok installed Priority: optional Section: utils Installed-Size: 104 Maintainer: Ubuntu Developers ubuntu-devel-discuss@lists.ubuntu.com Architecture: amd64 Version: 2.9.7-1ubuntu1 Depends: libc6 (>= 2.14), libfuse2 (= 2.9.7-1ubuntu1), adduser, mount (>= 2.19.1), sed (>= 4) Conffiles: /etc/fuse.conf 298587592c8444196833f317def414f2 Description: Filesystem in Userspace Filesystem in Userspace (FUSE) is a simple interface for userspace programs to export a virtual filesystem to the Linux kernel. It also aims to provide a secure method for non privileged users to create and mount their own filesystem implementations.

Kernel information (uname -r)

5.4.0-72-generic

GNU/Linux Distribution, if applicable (cat /etc/os-release)

NAME="elementary OS" VERSION="5.1.7 Hera" ID=elementary ID_LIKE=ubuntu PRETTY_NAME="elementary OS 5.1.7 Hera" LOGO=distributor-logo VERSION_ID="5.1.7" HOME_URL="https://elementary.io/" SUPPORT_URL="https://elementary.io/support" BUG_REPORT_URL="https://github.com/elementary/os/issues/new" PRIVACY_POLICY_URL="https://elementary.io/privacy-policy" VERSION_CODENAME=hera UBUNTU_CODENAME=bionic

s3fs command line used, if applicable

caspian@~$ s3fs personal.bucket.com:/mypath es3/ -o dbglevel=debug -f -o curldbg [CRT] s3fs.cpp:set_s3fs_log_level(257): change debug level from [CRT] to [DBG] [INF] s3fs.cpp:set_mountpoint_attribute(4193): PROC(uid=1000, gid=1000) - MountPoint(uid=1000, gid=1000, mode=40775) s3fs: could not determine how to establish security credentials.

Details about issue

I have a ~/.aws/credentials file and I am hoping s3fs to use it. I already looked at /var/log/syslog, there was nothing for s3fs. I'm not sure where else to look. Thanks for your help.

CarstenGrohmann commented 3 years ago

s3fs supports using credentials from ${HOME}/.aws/credentials as well as /etc/passwd-s3fs and $HOME/.passwd-s3fs.

~/.aws/credentials supports different profiles. The profile "default" is used by s3fs if no other profile name is choosen with -o profile <other profile>.

Example:

# cat ~/.aws/credentials
[default]
aws_access_key_id = XXXXXXXXXXXXXXXXXXXX
aws_secret_access_key = AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
[test42]
aws_access_key_id = YYYYYYYYYYYYYYYYYYYY
aws_secret_access_key = BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB

Your s3fs command line doesn't contain -o profile <other profile>. Therefore, please check if you have a "default" profile in your ~/.aws/credentials like show in the example above, please.

rbavery commented 2 years ago

I have a credential file with a default profile as shown above but I still get this error s3fs: could not determine how to establish security credentials.

ubuntu@ip-xxxx:~$ aws configure
AWS Access Key ID [None]: xxxx
AWS Secret Access Key [None]: xxx
Default region name [None]: us-west-2
Default output format [None]: json
ubuntu@ip-xxxx:~$ s3fs xxxx xxxx
s3fs: could not determine how to establish security credentials.
ubuntu@ip-xxxx:~$ cat ~/.aws/credentials
[default]
aws_access_key_id = xxxx
aws_secret_access_key = xxxx
goetzc commented 5 days ago

Could the -o profile option use the value of the AWS_PROFILE environment variable, that is also used by the AWS CLI? This behavior would feel more intuitive.