[PR #2087] [MERGED] Retry BucketCheck containing directory paths #2332

Closed
opened 2026-03-04 02:04:59 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/s3fs-fuse/s3fs-fuse/pull/2087
Author: @ggtakec
Created: 1/5/2023
Status: Merged
Merged: 1/9/2023
Merged by: @gaul

Base: masterHead: fix_bucket_check


📝 Commits (1)

  • 021bce4 Retry BucketCheck containing directory paths

📊 Changes

3 files changed (+60 additions, -13 deletions)

View changed files

📝 src/curl.cpp (+7 -3)
📝 src/curl.h (+1 -1)
📝 src/s3fs.cpp (+52 -9)

📄 Description

Relevant Issue (if applicable)

#2063 #1728 #1687 #1460

Details

Fixed a bug where a bucket has no permissions and a directory has permissions, and a mount with that directory fails.
This PR is related to #1728 which was previously fixed.

Specification

Here's a bucket check on s3fs startup and a description of how it works in this PR.

The following patterns for mount point are supported by s3fs:

  1. Mount the bucket top
  2. Mount the directory(folder) under the bucket. In this case, there are the following cases:
    ( 2A) Directories created by clients other than s3fs
    ( 2B) Directory created by s3fs

At first, if user has access to the bucket, the checking access to the bucket succeeds and this function returns success.
However, if user does not have access to the bucket and has permissions to the directory, this first check will fail.
But if user specifies the directory for mount point, this function retries to check with the path containing the directory.
And it will be success.

In the case of (2A), the check will succeed if the bucket allows to access, but will fail if permissions are granted only to the directory, as it is not a directory recognized by s3fs.
This combination is not supported by s3fs, so make sure user create the directory before starting s3fs.
In case (2B), if user does not have access to bucket, the first check(to bucket) fails, but the retry check(with path) succeeds.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/s3fs-fuse/s3fs-fuse/pull/2087 **Author:** [@ggtakec](https://github.com/ggtakec) **Created:** 1/5/2023 **Status:** ✅ Merged **Merged:** 1/9/2023 **Merged by:** [@gaul](https://github.com/gaul) **Base:** `master` ← **Head:** `fix_bucket_check` --- ### 📝 Commits (1) - [`021bce4`](https://github.com/s3fs-fuse/s3fs-fuse/commit/021bce4b651af1874caf3588ee49a012321c9d6b) Retry BucketCheck containing directory paths ### 📊 Changes **3 files changed** (+60 additions, -13 deletions) <details> <summary>View changed files</summary> 📝 `src/curl.cpp` (+7 -3) 📝 `src/curl.h` (+1 -1) 📝 `src/s3fs.cpp` (+52 -9) </details> ### 📄 Description ### Relevant Issue (if applicable) #2063 #1728 #1687 #1460 ### Details Fixed a bug where a bucket has no permissions and a directory has permissions, and a mount with that directory fails. This PR is related to #1728 which was previously fixed. #### Specification Here's a bucket check on s3fs startup and a description of how it works in this PR. The following patterns for mount point are supported by s3fs: 1. Mount the bucket top 2. Mount the directory(folder) under the bucket. In this case, there are the following cases: ( 2A) Directories created by clients other than s3fs ( 2B) Directory created by s3fs At first, if user has access to the bucket, the checking access to the bucket succeeds and this function returns success. However, if user does not have access to the bucket and has permissions to the directory, this first check will fail. But if user specifies the directory for mount point, this function retries to check with the path containing the directory. And it will be success. In the case of (2A), the check will succeed if the bucket allows to access, but will fail if permissions are granted only to the directory, as it is not a directory recognized by s3fs. This combination is not supported by s3fs, so make sure user create the directory before starting s3fs. In case (2B), if user does not have access to bucket, the first check(to bucket) fails, but the retry check(with path) succeeds. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-04 02:04:59 +03:00
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#2332
No description provided.