从运行在Azure上的CentOS 7虚拟机上,我无法使用s3fs挂载AWS S3桶。在s3fs检查桶是否存在之前,删除桶位置的路径部分:
s3fs version 1.90(unknown) : s3fs -f -o dbglevel=debug,endpoint=eu-west-1,profile=customer,bucket=company-sftp:/Customer/dev /srv/test_s3/
s3fs_logger.cpp:LowSetLogLevel(240): change debug level from [CRT] to [DBG]
s3fs.cpp:set_mountpoint_attribute(4094): PROC(uid=1000, gid=1000) - MountPoint(uid=1000, gid=0, mode=40755)
s3fs.cpp:s3fs_init(3382): init v1.90(commit:unknown) with OpenSSL
s3fs.cpp:s3fs_check_service(3516): check services.
curl.cpp:CheckBucket(3388): check a bucket.
curl_handlerpool.cpp:GetHandler(81): Get handler from pool: rest = 31
curl.cpp:ResetHandle(1945): The CURLOPT_SSL_ENABLE_ALPN option could not be unset. S3 server does not support ALPN, then this option should be disabled to maximize performance. you need to use libcurl 7.36.0 or later.
curl.cpp:ResetHandle(1948): The S3FS_CURLOPT_KEEP_SENDING_ON_ERROR option could not be set. For maximize performance you need to enable this option and you should use libcurl 7.51.0 or later.
curl_util.cpp:prepare_url(254): URL is https://s3.amazonaws.com/company-sftp/
curl_util.cpp:prepare_url(287): URL changed is https://company-sftp.s3.amazonaws.com/
curl.cpp:RequestPerform(2283): connecting to URL https://company-sftp.s3.amazonaws.com/
curl.cpp:insertV4Headers(2680): computing signature [GET] [/] [] []
curl_util.cpp:url_to_host(331): url is https://s3.amazonaws.com
curl.cpp:RequestPerform(2363): HTTP response code 403, returning EPERM. Body Text: <?xml version="1.0" encoding="UTF-8"?>
<Error><Code>AccessDenied</Code><Message>Access Denied</Message><RequestId>[...]</RequestId><HostId>[...]</HostId></Error>"customer“配置文件包含IAM用户的凭据,该用户只能访问桶的/Customer/dev部分。
使用相同的S3桶和凭据,在Ubuntu20.04.3上使用sshfs 1.86-1 (和libcurl 7.68.0-1 ubuntu2.7),我没有得到相同的行为:
s3fs -f /home/dleborgne/s3 -o dbglevel=debug,endpoint=eu-west-1,profile=customer,bucket=company-sftp:/Customer/dev
[CRT] s3fs.cpp:set_s3fs_log_level(297): change debug level from [CRT] to [DBG]
[INF] s3fs.cpp:set_mountpoint_attribute(4400): PROC(uid=1000, gid=1000) - MountPoint(uid=1000, gid=1000, mode=40755)
[INF] s3fs.cpp:s3fs_init(3493): init v1.86(commit:unknown) with GnuTLS(gcrypt)
[INF] s3fs.cpp:s3fs_check_service(3828): check services.
[INF] curl.cpp:CheckBucket(3413): check a bucket.
[DBG] curl.cpp:GetHandler(289): Get handler from pool: rest = 31
[INF] curl.cpp:prepare_url(4703): URL is https://s3.amazonaws.com/company-sftp/Customer/dev/
[INF] curl.cpp:prepare_url(4736): URL changed is https://company-sftp.s3.amazonaws.com/Customer/dev/
[DBG] curl.cpp:RequestPerform(2384): connecting to URL https://company-sftp.s3.amazonaws.com/Customer/dev/
[INF] curl.cpp:insertV4Headers(2753): computing signature [GET] [/Customer/dev/] [] []
[INF] curl.cpp:url_to_host(99): url is https://s3.amazonaws.com
[INF] curl.cpp:RequestPerform(2416): HTTP response code 200在一种情况下(Ubuntu上的s3fs 1.86 ),s3fs使用https://company-sftp.s3.amazonaws.com/Customer/dev/检查凭据,而在另一种情况下(CentOS上的s3fs 1.90 ),它使用微调的url https://company-sftp.s3.amazonaws.com/并失败。
我对这种差异感到困惑,欢迎你提出任何意见。
发布于 2022-03-16 21:16:49
我这边也有同样的问题。
我想,URL处理有一个问题,您可以查看日志记录行:
RHEL / CentOS不工作
URL is https://s3.amazonaws.com/company-sftp/
URL changed is https://company-sftp.s3.amazonaws.com/
computing signature [GET] [/] [] []Ubuntu,工作
URL is https://s3.amazonaws.com/company-sftp/Customer/dev/
URL changed is https://company-sftp.s3.amazonaws.com/Customer/dev/
computing signature [GET] [/Customer/dev/] [] []https://serverfault.com/questions/1092782
复制相似问题