[GH-ISSUE #485] Unable to write to mounted bucket #271

Closed
opened 2026-03-04 01:43:55 +03:00 by kerem · 1 comment
Owner

Originally created by @MgFrobozz on GitHub (Oct 14, 2016).
Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/485

This is in Ubuntu 14.04.5 LTS using f38aaa3d0e
My intent is to create a mount that www-data can use for an upload location.
I'm running the mount below ("xxx" is the obscured bucket name, "zzz" the obscured home directory).

sudo s3fs xxx /home/zzz/web/upload
-o passwd_file=/etc/passwd-s3fs,allow_other,umask=0022,uid=33,gid=33,use_cache=/tmp,url=https://s3.amazonaws.com,endpoint=us-west-2
-d -f

User and group for www-data are 33.
Fuse correctly sets the directory owner and permission:

ls -ld upload
drwxr-xr-x 1 www-data www-data 0 Jan 1 1970 upload

The bucket contains a single folder "avatars", created from the S3 console, which shows in ubuntu as ...

ls -l upload
?????????? ? ? ? ? ? avatars

... with this error in the log:

[WAN] curl.cpp:MultiRead(3892): failed a request(403: http://xxx.s3.amazonaws.com/avatars/)
[ERR] s3fs.cpp:multi_head_retry_callback(2314): Over retry count(3) limit(/avatars/).

When I try to copy a file (foo.txt, containing "foo") to upload, it shows ...

cp foo.txt upload
cp: cannot create regular file ‘upload/foo.txt’: No such file or directory

ls -l upload
ls: cannot access upload/avatars: No such file or directory
ls: cannot access upload/foo.txt: No such file or directory
total 0
?????????? ? ? ? ? ? avatars
?????????? ? ? ? ? ? foo.txt

... with the same multi_head_retry_callback error.

After writing foo.txt, the S3 console shows foo.txt as size 0 bytes.
I am able to upload another 3-byte file (foo_2.txt) in the S3 console, which shows up as size 3 bytes.

Any suggestions for further debug are greatly appreciated.

Originally created by @MgFrobozz on GitHub (Oct 14, 2016). Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/485 This is in Ubuntu 14.04.5 LTS using f38aaa3d0e My intent is to create a mount that www-data can use for an upload location. I'm running the mount below ("xxx" is the obscured bucket name, "zzz" the obscured home directory). > sudo s3fs xxx /home/zzz/web/upload \ > -o passwd_file=/etc/passwd-s3fs,allow_other,umask=0022,uid=33,gid=33,use_cache=/tmp,url=https://s3.amazonaws.com,endpoint=us-west-2 \ > -d -f User and group for www-data are 33. Fuse correctly sets the directory owner and permission: > > ls -ld upload > drwxr-xr-x 1 www-data www-data 0 Jan 1 1970 upload The bucket contains a single folder "avatars", created from the S3 console, which shows in ubuntu as ... > > ls -l upload > ?????????? ? ? ? ? ? avatars ... with this error in the log: > [WAN] curl.cpp:MultiRead(3892): failed a request(403: http://xxx.s3.amazonaws.com/avatars/) > [ERR] s3fs.cpp:multi_head_retry_callback(2314): Over retry count(3) limit(/avatars/). When I try to copy a file (foo.txt, containing "foo") to upload, it shows ... > > cp foo.txt upload > cp: cannot create regular file ‘upload/foo.txt’: No such file or directory > > > ls -l upload > ls: cannot access upload/avatars: No such file or directory > ls: cannot access upload/foo.txt: No such file or directory > total 0 > ?????????? ? ? ? ? ? avatars > ?????????? ? ? ? ? ? foo.txt ... with the same multi_head_retry_callback error. After writing foo.txt, the S3 console shows foo.txt as size 0 bytes. I am able to upload another 3-byte file (foo_2.txt) in the S3 console, which shows up as size 3 bytes. Any suggestions for further debug are greatly appreciated.
kerem closed this issue 2026-03-04 01:43:56 +03:00
Author
Owner

@MgFrobozz commented on GitHub (Oct 17, 2016):

Ignore this issue. I had the permissions for the bucket set to include "Any authenticated AWS user". I had added a user under IAM, gotten that user's credentials, used them to mount, and got the results above. Apparently "Any authenticated AWS user" means "Any AWS user authenticated under IAM who is also a member of a group with AmazonS3FullAccess permissions".

Once I'd created that group in IAM, and then added the user to that group, I was able to list/read/write/delete files normally ...

ls -l tigerfloss/
total 1
drwxr-xr-x 1 www-data www-data 0 Oct 14 14:05 avatars
-rwxr-xr-x 1 www-data www-data 4 Oct 17 13:00 foo.txt

<!-- gh-comment-id:254316513 --> @MgFrobozz commented on GitHub (Oct 17, 2016): Ignore this issue. I had the permissions for the bucket set to include "Any authenticated AWS user". I had added a user under IAM, gotten that user's credentials, used them to mount, and got the results above. Apparently "Any authenticated AWS user" means "Any AWS user authenticated under IAM who is also a member of a group with AmazonS3FullAccess permissions". Once I'd created that group in IAM, and then added the user to that group, I was able to list/read/write/delete files normally ... > > ls -l tigerfloss/ > > total 1 > > drwxr-xr-x 1 www-data www-data 0 Oct 14 14:05 avatars > > -rwxr-xr-x 1 www-data www-data 4 Oct 17 13:00 foo.txt
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#271
No description provided.