[GH-ISSUE #2171] [Question] Can /etc/passwd-s3fs have more then one credential? #1102

Closed
opened 2026-03-04 01:51:24 +03:00 by kerem · 3 comments
Owner

Originally created by @yuriw on GitHub (May 27, 2023).
Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/2171

Additional Information

Version of s3fs being used (s3fs --version)

s3fs --version
Amazon Simple Storage Service File System V1.86 (commit:unknown) with GnuTLS(gcrypt)

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

Kernel information (uname -r)

5.15.0-72-generic

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

How to run s3fs, if applicable

[] command line
[] /etc/fstab

NAME="Ubuntu"
VERSION="20.04.6 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.6 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal

#s3fs mount
s3fs#delete1 /media/dreamhost/ fuse _netdev,allow_other,passwd_file=/etc/passwd-s3fs,url=https://objects-us-east-1.dream.io/,umask=000 0 0

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

Details about issue

I'd like to mount three more buckets and am unclear what the best way to handle credentials
I have one line in /etc/passwd-s3fs

TIA

Originally created by @yuriw on GitHub (May 27, 2023). Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/2171 <!-- -------------------------------------------------------------------------- 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. --------------------------------------------------------------------------- --> ### Additional Information #### Version of s3fs being used (`s3fs --version`) <!-- example: V1.91 (commit:b19262a) --> s3fs --version Amazon Simple Storage Service File System V1.86 (commit:unknown) with GnuTLS(gcrypt) #### Version of fuse being used (`pkg-config --modversion fuse`, `rpm -qi fuse` or `dpkg -s fuse`) <!-- example: 2.9.2 --> #### Kernel information (`uname -r`) <!-- example: 5.10.96-90.460.amzn2.x86_64 --> 5.15.0-72-generic #### GNU/Linux Distribution, if applicable (`cat /etc/os-release`) <!-- command result --> #### How to run s3fs, if applicable <!-- Describe the s3fs "command line" or "/etc/fstab" entry used. --> [] command line [] /etc/fstab NAME="Ubuntu" VERSION="20.04.6 LTS (Focal Fossa)" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 20.04.6 LTS" VERSION_ID="20.04" HOME_URL="https://www.ubuntu.com/" SUPPORT_URL="https://help.ubuntu.com/" BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" VERSION_CODENAME=focal UBUNTU_CODENAME=focal <!-- Executed command line or /etc/fastab entry --> ``` #s3fs mount s3fs#delete1 /media/dreamhost/ fuse _netdev,allow_other,passwd_file=/etc/passwd-s3fs,url=https://objects-us-east-1.dream.io/,umask=000 0 0 ``` #### 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 <!-- Please describe the content of the issue in detail. --> I'd like to mount three more buckets and am unclear what the best way to handle credentials I have one line in /etc/passwd-s3fs TIA
kerem closed this issue 2026-03-04 01:51:25 +03:00
Author
Owner

@gaul commented on GitHub (May 30, 2023):

Can you just add three more lines, each with a different bucket, mountpoint, and passwd_file? Another approach is to use the profile option.

<!-- gh-comment-id:1567715759 --> @gaul commented on GitHub (May 30, 2023): Can you just add three more lines, each with a different bucket, mountpoint, and `passwd_file`? Another approach is to use the profile option.
Author
Owner

@yuriw commented on GitHub (May 30, 2023):

@gaul Sure I can and in fact, that's what I did :)

I was wondering what's the most recommended way.
Can you elaborate on profile option pls?

<!-- gh-comment-id:1568657578 --> @yuriw commented on GitHub (May 30, 2023): @gaul Sure I can and in fact, that's what I did :) I was wondering what's the most recommended way. Can you elaborate on `profile option` pls?
Author
Owner

@ggtakec commented on GitHub (Jun 10, 2023):

@yuriw
s3fs can use the credential file(${HOME}/.aws/credentials) used by aws cli as credentials.
This file can contain multiple profile information, and the profile(user) can be specified with the profile option(profile=<profile name>) of s3fs.
Any profile can be created with aws configure --profile <profile name>. (This is a text file, so edit it however you like)
s3fs only uses the AWS Access Key ID(aws_access_key_id) and AWS Secret Access Key(aws_secret_access_key) fields.

Please try it.
This issue will be closed, but please reopen it if you still have problems.

<!-- gh-comment-id:1585423571 --> @ggtakec commented on GitHub (Jun 10, 2023): @yuriw s3fs can use the credential file(${HOME}/.aws/credentials) used by `aws cli` as credentials. This file can contain multiple profile information, and the profile(user) can be specified with the `profile` option(`profile=<profile name>`) of s3fs. Any profile can be created with `aws configure --profile <profile name>`. (This is a text file, so edit it however you like) s3fs only uses the `AWS Access Key ID(aws_access_key_id)` and `AWS Secret Access Key(aws_secret_access_key)` fields. Please try it. _This issue will be closed, but please reopen it if you still have problems._
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#1102
No description provided.