[GH-ISSUE #1138] Unable to mount when using EC2 IAM Roles #597

Closed
opened 2026-03-04 01:47:03 +03:00 by kerem · 2 comments
Owner

Originally created by @trajano on GitHub (Sep 3, 2019).
Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/1138

Additional Information

I've set up an AWS instance that has permissions to access an S3 container. I can verify it by doing an

aws s3 ls my.bucket.name

My bucket name has dots.

So as per https://github.com/s3fs-fuse/s3fs-fuse/issues/332 I have added the following in fstab

s3fs#my.bucket.name /daemon-keystore fuse _netdev,allow_other,use_path_request_style,url=http://s3.amazonaws.com 0 0 | tee -a /etc/fstab

I also tried

s3fs -o use_path_request_style my.bucket.name /mnt

Both end up with

s3fs: could not determine how to establish security credentials.

The following information is very important in order to help us to help you. Omission of the following details may delay your support request or receive no attention at all.
Keep in mind that the commands we provide to retrieve information are oriented to GNU/Linux Distributions, so you could need to use others if you use s3fs on macOS or BSD

Version of s3fs being used (s3fs --version)

Amazon Simple Storage Service File System V1.85(commit:unknown) with OpenSSL
Copyright (C) 2010 Randy Rizun <rrizun@gmail.com>
License GPL2: GNU GPL version 2 <https://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

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

Name        : fuse
Version     : 2.9.2
Release     : 11.amzn2
Architecture: x86_64
Install Date: Tue 03 Sep 2019 02:56:02 AM UTC
Group       : System Environment/Base
Size        : 222809
License     : GPL+
Signature   : RSA/SHA256, Thu 06 Dec 2018 07:31:53 PM UTC, Key ID 11cf1f95c87f5b1a
Source RPM  : fuse-2.9.2-11.amzn2.src.rpm
Build Date  : Fri 16 Nov 2018 08:35:39 PM UTC
Build Host  : build.amazon.com
Relocations : (not relocatable)
Packager    : Amazon Linux
Vendor      : Amazon Linux
URL         : https://github.com/libfuse/libfuse
Summary     : File System in Userspace (FUSE) utilities
Description :
With FUSE it is possible to implement a fully functional filesystem in a
userspace program. This package contains the FUSE userspace tools to
mount a FUSE filesystem.

Kernel information (uname -r)

4.14.123-111.109.amzn2.x86_64

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

command result: cat /etc/os-release

s3fs command line used, if applicable

s3fs -o use_path_request_style my.bucket.name /mnt

/etc/fstab entry, if applicable

s3fs#my.bucket.name /daemon-keystore fuse _netdev,allow_other,use_path_request_style,url=http://s3.amazonaws.com 0 0 | tee -a /etc/fstab

s3fs syslog messages (grep s3fs /var/log/syslog, journalctl | grep s3fs, or s3fs outputs)

if you execute s3fs with dbglevel, curldbg option, you can get detail debug messages

Details about issue

Originally created by @trajano on GitHub (Sep 3, 2019). Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/1138 ### Additional Information I've set up an AWS instance that has permissions to access an S3 container. I can verify it by doing an aws s3 ls my.bucket.name My bucket name has dots. So as per https://github.com/s3fs-fuse/s3fs-fuse/issues/332 I have added the following in fstab s3fs#my.bucket.name /daemon-keystore fuse _netdev,allow_other,use_path_request_style,url=http://s3.amazonaws.com 0 0 | tee -a /etc/fstab I also tried s3fs -o use_path_request_style my.bucket.name /mnt Both end up with > s3fs: could not determine how to establish security credentials. _The following information is very important in order to help us to help you. Omission of the following details may delay your support request or receive no attention at all._ _Keep in mind that the commands we provide to retrieve information are oriented to GNU/Linux Distributions, so you could need to use others if you use s3fs on macOS or BSD_ #### Version of s3fs being used (s3fs --version) ``` Amazon Simple Storage Service File System V1.85(commit:unknown) with OpenSSL Copyright (C) 2010 Randy Rizun <rrizun@gmail.com> License GPL2: GNU GPL version 2 <https://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. ``` #### Version of fuse being used (pkg-config --modversion fuse, rpm -qi fuse, dpkg -s fuse) ``` Name : fuse Version : 2.9.2 Release : 11.amzn2 Architecture: x86_64 Install Date: Tue 03 Sep 2019 02:56:02 AM UTC Group : System Environment/Base Size : 222809 License : GPL+ Signature : RSA/SHA256, Thu 06 Dec 2018 07:31:53 PM UTC, Key ID 11cf1f95c87f5b1a Source RPM : fuse-2.9.2-11.amzn2.src.rpm Build Date : Fri 16 Nov 2018 08:35:39 PM UTC Build Host : build.amazon.com Relocations : (not relocatable) Packager : Amazon Linux Vendor : Amazon Linux URL : https://github.com/libfuse/libfuse Summary : File System in Userspace (FUSE) utilities Description : With FUSE it is possible to implement a fully functional filesystem in a userspace program. This package contains the FUSE userspace tools to mount a FUSE filesystem. ``` #### Kernel information (uname -r) 4.14.123-111.109.amzn2.x86_64 #### GNU/Linux Distribution, if applicable (cat /etc/os-release) _command result: cat /etc/os-release_ #### s3fs command line used, if applicable ``` s3fs -o use_path_request_style my.bucket.name /mnt ``` #### /etc/fstab entry, if applicable ``` s3fs#my.bucket.name /daemon-keystore fuse _netdev,allow_other,use_path_request_style,url=http://s3.amazonaws.com 0 0 | tee -a /etc/fstab ``` #### s3fs syslog messages (grep s3fs /var/log/syslog, journalctl | grep s3fs, or s3fs outputs) _if you execute s3fs with dbglevel, curldbg option, you can get detail debug messages_ ``` ``` ### Details about issue
kerem closed this issue 2026-03-04 01:47:04 +03:00
Author
Owner

@trajano commented on GitHub (Sep 3, 2019):

Digging more into it I found https://github.com/s3fs-fuse/s3fs-fuse/issues/573 but when doing it I get

[root@manager0-simple-test daemon-keystore]# ls /mnt
ls: reading directory /mnt: Input/output error
<!-- gh-comment-id:527305906 --> @trajano commented on GitHub (Sep 3, 2019): Digging more into it I found https://github.com/s3fs-fuse/s3fs-fuse/issues/573 but when doing it I get ``` [root@manager0-simple-test daemon-keystore]# ls /mnt ls: reading directory /mnt: Input/output error ```
Author
Owner

@trajano commented on GitHub (Sep 3, 2019):

Ok found the right sequence

s3fs  -o iam_role -o url=http://s3.amazonaws.com  my.bucket.name /mnt

Also the /etc/fstab version

s3fs#my.bucket.name  /daemon-keystore fuse _netdev,allow_other,iam_role,url=http://s3.amazonaws.com 0 0
<!-- gh-comment-id:527306746 --> @trajano commented on GitHub (Sep 3, 2019): Ok found the right sequence s3fs -o iam_role -o url=http://s3.amazonaws.com my.bucket.name /mnt Also the /etc/fstab version s3fs#my.bucket.name /daemon-keystore fuse _netdev,allow_other,iam_role,url=http://s3.amazonaws.com 0 0
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/s3fs-fuse#597
No description provided.