[GH-ISSUE #2117] Error code for the wrong commands #1078

Open
opened 2026-03-04 01:51:13 +03:00 by kerem · 1 comment
Owner

Originally created by @ValentinNikin on GitHub (Feb 20, 2023).
Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/2117

Additional Information

Version of s3fs being used (s3fs --version)

V1.89

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

fuse3 3.10.3-2

Kernel information (uname -r)

5.10.0-21-cloud-amd64

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

Debian GNU/Linux 11 (bullseye)

How to run s3fs, if applicable

s3fs -o iam_role=auto temp-tec-bucket:/SOURCE /home/admin/.cache/s3/czM6Ly90ZW1wLXRlYy1idWNrZXQvU09VUkNF/

Details about issue

I'm using s3fs on EC2 instance to track files in the bucket. Access to the bucket configured throught IAM Role assigned to the EC2 instance.
I noticed that s3fs return success code (echo ?$ -> 0) even if IAM Role does not give access to the bucket. Is it correct behaviour?
I can find out about the error only if I look at the s3fs logs. Is there any way to configure s3fs to return an error code if there are problem with permissions to access.

Originally created by @ValentinNikin on GitHub (Feb 20, 2023). Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/2117 ### Additional Information #### Version of s3fs being used (`s3fs --version`) V1.89 #### Version of fuse being used (`pkg-config --modversion fuse`, `rpm -qi fuse` or `dpkg -s fuse`) fuse3 3.10.3-2 #### Kernel information (`uname -r`) 5.10.0-21-cloud-amd64 #### GNU/Linux Distribution, if applicable (`cat /etc/os-release`) Debian GNU/Linux 11 (bullseye) #### How to run s3fs, if applicable s3fs -o iam_role=auto temp-tec-bucket:/SOURCE /home/admin/.cache/s3/czM6Ly90ZW1wLXRlYy1idWNrZXQvU09VUkNF/ ### Details about issue I'm using s3fs on EC2 instance to track files in the bucket. Access to the bucket configured throught IAM Role assigned to the EC2 instance. I noticed that s3fs return success code (echo ?$ -> 0) even if IAM Role does not give access to the bucket. Is it correct behaviour? I can find out about the error only if I look at the s3fs logs. Is there any way to configure s3fs to return an error code if there are problem with permissions to access.
Author
Owner

@ggtakec commented on GitHub (Mar 12, 2023):

Could you access files(objects) that cannot be accessed by IAM settings from s3fs (specify IAM role)?
In other words, could the file be referenced with the ls or cat command?
If you can refer to it with those commands, I think you need to check the settings such as IAM.
Since s3fs returns return code = 0, I think that this file can be accessed.

Also, s3fs fixes some bugs, so if you can, try using v1.91 or with the code from the master branch.
If the behavior is strange, please refer to the log by specifying options such as dbglevel=info.

<!-- gh-comment-id:1465078576 --> @ggtakec commented on GitHub (Mar 12, 2023): Could you access files(objects) that cannot be accessed by IAM settings from s3fs (specify IAM role)? In other words, could the file be referenced with the `ls` or `cat` command? If you can refer to it with those commands, I think you need to check the settings such as IAM. _Since s3fs returns return code = 0, I think that this file can be accessed._ Also, s3fs fixes some bugs, so if you can, try using v1.91 or with the code from the master branch. If the behavior is strange, please refer to the log by specifying options such as `dbglevel=info`.
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#1078
No description provided.