mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2026-04-25 05:16:00 +03:00
[GH-ISSUE #693] Bucket name includes dots + use_path_request_style + eu-central-1; Gives 301 Moved Permanently #388
Labels
No labels
bug
bug
dataloss
duplicate
enhancement
feature request
help wanted
invalid
need info
performance
pull-request
question
question
testing
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/s3fs-fuse#388
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @catavan on GitHub (Nov 27, 2017).
Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/693
Version of s3fs being used
Amazon Simple Storage Service File System V1.82(commit:566961c) with OpenSSL
Version of fuse being used
2.9.7
System information
4.13.0-17-generic
Distro
Ubuntu 17.10
s3fs command line used
s3fs my.working.bucket.name /home/me/s3 -o use_path_request_style -o endpoint=eu-central-1 -o passwd_file=/etc/passwd-s3fs -o curldbg -fs3fs syslog messages (grep s3fs /var/log/syslog, or s3fs outputs)
`[INF] s3fs.cpp:s3fs_init(3371): init v1.82(commit:566961c) with OpenSSL
< HTTP/1.1 301 Moved Permanently
< x-amz-bucket-region: eu-central-1
< x-amz-request-id: ACC928843271B61C
< x-amz-id-2: /zO0/tq1K1JyaIAoJmWmg0A94Iud8HAQMRIRJ/S/+N/3H4xV9m+ql2MqdxCSG4N3WM4qirwmBQQ=
< Content-Type: application/xml
< Transfer-Encoding: chunked
< Date: Mon, 27 Nov 2017 15:57:45 GMT
< Server: AmazonS3
<
Details about issue
Hi guys
I have a bucket on eu-central-1 and with dots in the bucket name and after some investigation I found the FAQ page (https://github.com/s3fs-fuse/s3fs-fuse/wiki/FAQ#q-https-connecting-failed-if-bucket-name-includes-dod)
Tried to mount using "-o use_path_request_style -o endpoint=eu-central-1":
s3fs my.working.bucket.name /home/me/s3 -o use_path_request_style -o endpoint=eu-central-1 -o passwd_file=/etc/passwd-s3fs -o curldbg -fIt seams I got a 301 in the response and the mounted folder is "empty"
I am doing something wrong with the options ? Some help will be really appreciated!
THX!
@haydenyoung commented on GitHub (Jan 5, 2018):
Can confirm the same problem for eu-west-2 region (London).
HTTP/1.1 301 Moved PermanentlyUsing
s3fs bucket /media/bucket -o passwd_file=/etc/s3fs-pwd,use_path_request_style,endpoint=eu-west-2,curldbg -ouid=1001,gid=1001,allow_other,mp_umask=002 -o sigv2 -o nocopyapiProblem causes any file I try to edit using vim to be readonly. When I try to exit the file it seems to get stuck in some kind of infinite loop and I have to kill vim.
@haydenyoung commented on GitHub (Jan 5, 2018):
Can confirm that changing my bucket from my.bucket.for.mounting to my-bucket-for-mounting fixes the problem so it appears the issues related to "use_path_request_style"?
@Kusmarius commented on GitHub (Jan 22, 2018):
It have nothing to do with dots.
My bucket name is formatted like this x-xxx-xxx and still getting 301 moved
@vash1486 commented on GitHub (Jan 29, 2018):
same problem here with eu-west-1
s3fs my.bucket.name /mnt/s3/ -o passwd_file=/etc/passwd-s3fs -o dbglevel=info -f -o curldbg -o use_path_request_style -o endpoint=eu-west-1P.s. Os and version are the same as @catavan
@rymesaint commented on GitHub (Feb 19, 2018):
try this :
s3fs bucketName /mountpoint -o passwd_file=/etc/passwd-s3fs -o use_path_request_style -o url=http://s3-your endpoint.amazonaws.com
@vash1486 commented on GitHub (Feb 19, 2018):
hi, @rymesaint! unfortunately I have the same problem with your suggestion :(
s3fs bucket.name /mnt/s3 -o passwd_file=/etc/passwd-s3fs -o use_path_request_style -o url=http://s3-eu-west-1.amazonaws.com -o dbglevel=info -f -o curldbg
@rymesaint commented on GitHub (Feb 20, 2018):
@vash1486 What's your log error? Can you share it?
@vash1486 commented on GitHub (Feb 20, 2018):
ops, my mistake! trying again, it worked fine! thanks @rymesaint 👍 :)
@gaul commented on GitHub (Jan 16, 2019):
s3fs handles this properly for me:
Can you provide exact steps to reproduce this issue?
@gaul commented on GitHub (Jan 16, 2019):
Similarly with
-o use_path_request_style:@gaul commented on GitHub (Jan 17, 2019):
One problem is that s3fs does not flag the 301 as a failure.
CheckBucketinterpretsAuthorizationHeaderMalformedcorrectly but also needs to consumePermanentRedirectresponses.@gaul commented on GitHub (Jan 24, 2019):
@catavan master has some fixes for this; could you test and report back?
@gaul commented on GitHub (Apr 9, 2019):
Closing due to inactivity. Please reopen if symptoms persist.
@HeshamMeneisi commented on GitHub (Jun 19, 2020):
This issue still exists:
docker-compose command for the s3fs container (just ubuntu:latest with s3fs latest)
Debug Log
The only way to get it to work currently is to not use "use_path_request_style" and instead disable https
@gpoole commented on GitHub (Dec 7, 2020):
I had this issue on 1.87 and had success with rymesaint's workaround. Worked for me with HTTPS too, which is probably a good option to try first:
@yaegor commented on GitHub (Mar 25, 2021):
I confirm that for the bucket name with dots in region s3-eu-west-1, the only working command line from discussed above is "s3fs name.with.dots /data -o passwd_file=${HOME}/.passwd-s3fs -o url=http://s3-eu-west-1.amazonaws.com -o use_path_request_style" (note usage of "http://").
"-o url=https://s3-eu-west-1.amazonaws.com" results in "subjectAltName does not match name.with.dots.s3.amazonaws.com" TLS connection error.
FAQ suggests that "s3fs name.with.dots /data -o passwd_file=${HOME}/.passwd-s3fs -o use_path_request_style -o endpoint=eu-west-1" should work, but this reports 301 response "The bucket you are attempting to access must be addressed using the specified endpoint" noting "name.with.dots.amazonaws.com" endpoint and hangs for me after "curl_handlerpool.cpp:ReturnHandler(110): Pool full: destroy the oldest handler".
@gaul commented on GitHub (Apr 21, 2021):
I tested this and successfully mounted a bucket via:
AWS actually returns a
PermanentRedirecterror withEndpointbut it seems tricky to fix this up in the presence of the path request style. Happy to accept PRs to improve thes3fs_check_servicelogic.@gaul commented on GitHub (Apr 25, 2021):
I fixed up the
CheckBucketlogic which should give a more useful error. Can some user tell me if this helps?@nadyshalaby commented on GitHub (Sep 12, 2022):
I have concluded the final steps to connect to s3 bucket in these bash commands:
@teveelnicks commented on GitHub (Mar 31, 2025):
A working example for in fstab:
s3fs#<bucket.name> /mnt/<bucket.name> fuse _netdev,allow_other,use_path_request_style,url=https://s3.<s3-region>.amazonaws.com,endpoint=<s3-region> 0 0