mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2026-04-25 13:26:00 +03:00
[GH-ISSUE #2093] Unable to mount bucket on private s3 server due to url rewritting #1060
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#1060
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 @joaoe on GitHub (Jan 11, 2023).
Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/2093
Issue
My company runs a local instance of s3. There is a folder which I'm trying to mount on my computer.
I've tried some options, all failed.
Option 1.
This fails with the error
That url rewrite seems to break everything.
I've tried to workaround the url rewrite the following way:
Option 2.
This fails ever harder
So I tried a variation
Option 3
Which goes further but fails as well
I see both the
https://apps.company.net/andhttps://storage.apps.company.net/urls. Seems s3fs is confused which url to use and perhaps that affects something that causes that 403 error.Option 4
To make sure my configuration works I tried some python code
Which prints successfully
So my configuration is correct and can access the bucket from my workstation.
Additional Information
Version of s3fs being used (
s3fs --version)Version of fuse being used (
pkg-config --modversion fuse,rpm -qi fuseordpkg -s fuse)FUSE statically compiled into WSL kernel
Kernel information (
uname -r)GNU/Linux Distribution, if applicable (
cat /etc/os-release)Running a docker container with WSL 2 on Windows.
@joaoe commented on GitHub (Jan 12, 2023):
Update:
The solution was to pass
-o use_path_request_style.Can I suggest that s3fs tries both strategies and uses
-o use_path_request_styleas a fallback if the first one with the bucket name as subdomain fail and the user has specified an url ?@ggtakec commented on GitHub (Jan 15, 2023):
@joaoe
There are currently no plans to
use_path_request_styleas a fallback.If you need it, I think you should explicitly specify
use_path_request_style.Also, although it is not recommended(for security reasons), you may be able to start by adding the
no_check_certificateoption with theOption 1startup method you tried.@joaoe commented on GitHub (Jan 15, 2023):
Well, thank you :) That is the case right now. But the option is buried in the help.
Might I suggest at least that you print a warning message to advise the user to try that option if connecting fails ?
As you well know, that is not a long term solution.
@MatteoAntolini commented on GitHub (Jan 25, 2023):
I managed to mount it with this command
s3fs bucketname /mnt/s3-bucket/ -o passwd_file=/etc/passwd-s3fs -o url=https://host:port -o use_path_request_style -o ssl_verify_hostname=0 -o no_check_certificateI have a bucket on minio on an internal server
EDIT:
/etc/fstabs3fs#bucketname /mnt/s3-bucket fuse _netdev,allow_other,url=https://host:port,use_path_request_style,ssl_verify_hostname=0,no_check_certificate,passwd_file=/etc/passwd-s3fs 0 0@ggtakec commented on GitHub (Jan 29, 2023):
@joaoe
I gave up on wording as a suggestion in runtime errors because it is difficult to narrow down the countermeasures because the reasons differ depending on the situation.
Instead of that, I added a note to the man page regarding
urloption specification anduse_path_request_style.(I posted it as PR #2104.)Thanks.
@ggtakec commented on GitHub (Feb 1, 2023):
The note about those options were added to t he man page.
For now, let me close this issue.
If you still have problems, please reopen or post a new issue.
@ggtakec commented on GitHub (Feb 4, 2023):
I'll close this Issue, but if you have a problem about this, please reopen this or post new issue.
Thanks,