goofys icon indicating copy to clipboard operation
goofys copied to clipboard

Alibaba Cloud OSS mount issues for some regions

Open auhlik opened this issue 1 year ago • 0 comments

When using goofys (version 0.24.0-45b8d78375af1b24604439d2e60c567654bcdf88) with Alibaba Cloud OSS I've noticed that it works not for all regions.

For example, it works fine to mount public buckets in oss-us-east-1 US (Virginia), oss-ap-northeast-1 Japan (Tokyo), oss-eu-central-1 Germany (Frankfurt), oss-me-east-1 UAE (Dubai).

But it fails for public buckets in oss-cn-hangzhou China (Hangzhou), oss-eu-west-1 UK (London), oss-ap-northeast-2 South Korea (Seoul) with permission denied:

2023/02/03 14:39:12.867438 s3.INFO Falling back to v2 signer
2023/02/03 14:39:12.955319 main.ERROR Unable to access 'test-bucket': permission denied
2023/02/03 14:39:12.955344 main.FATAL Mounting file system: Mount: initialization failed

After adding debug options --debug_s3 --debug_fuse I've noticed one difference in responses between working (404 error) and non-working cases (403 error). Works:

2023/02/03 14:45:44.997714 s3.DEBUG DEBUG: Response s3/HeadObject Details:
---[ RESPONSE ]--------------------------------------
HTTP/1.1 404 Not Found
Content-Length: 278
Connection: keep-alive
Content-Type: application/xml
Date: Fri, 03 Feb 2023 06:45:44 GMT
Server: AliyunOSS
X-Amz-Request-Id: 63DCAD986E125F3936E3A8A6
X-Oss-Server-Time: 27

Doesn't work (later it will Fall back to v2 signer due to 403 error which is expected by design):

2023/02/03 14:41:10.736596 s3.DEBUG DEBUG: Response s3/HeadObject Details:
---[ RESPONSE ]--------------------------------------
HTTP/1.1 403 Forbidden
Content-Length: 258
Connection: keep-alive
Content-Type: application/xml
Date: Fri, 03 Feb 2023 06:41:10 GMT
Server: AliyunOSS
X-Amz-Request-Id: 63DCAC86A377E332396C716

Any ideas why it could happen?

P.S: I've tried to build the latest version from master on Linux and MacOS with different go versions to see if the issue exists in latest version but didn't succeed. There are already several open issues regarding the build from master.

auhlik avatar Feb 03 '23 06:02 auhlik