[GH-ISSUE #1736] mount non-existant S3 folder #890

Closed
opened 2026-03-04 01:49:42 +03:00 by kerem · 2 comments
Owner

Originally created by @bgdnlp on GitHub (Aug 3, 2021).
Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/1736

Would it be possible to make it so a mount can have an S3 prefix without requiring the S3 "folder" to exist? Or have s3fs create it if possible?

Currently when attempting to mount using a non-existent prefix there's an initial check that prevents it:

Check bucket failed, S3 response: <?xml version="1.0" encoding="UTF-8"?> <Error><Code>NoSuchKey</Code><Message>The specified key does not exist.</Message><Key>my-folder/</Key><RequestId>XXX</RequestId><HostId>XXX</HostId></Error>

But what's the harm if the prefix doesn't exist?

Additional Information

Example use case. Assuming files having a prefix "my-archive/", if an S3 lifecycle rule is set to remove files under that prefix it will also remove the parent "folder" after the set time and the next mount will fail. Not requiring the folder to exist, or automatically creating it, would avoid this issue.

Version of s3fs being used (s3fs --version)

1.89

Version of fuse being used (pkg-config --modversion fuse, rpm -qi fuse, dpkg -s fuse)

2.9.9

GNU/Linux Distribution, if applicable (cat /etc/os-release)

FreeBSD 12.2-RELEASE-p9

Originally created by @bgdnlp on GitHub (Aug 3, 2021). Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/1736 Would it be possible to make it so a mount can have an S3 prefix without requiring the S3 "folder" to exist? Or have s3fs create it if possible? Currently when attempting to mount using a non-existent prefix there's an initial check that prevents it: ``` Check bucket failed, S3 response: <?xml version="1.0" encoding="UTF-8"?> <Error><Code>NoSuchKey</Code><Message>The specified key does not exist.</Message><Key>my-folder/</Key><RequestId>XXX</RequestId><HostId>XXX</HostId></Error> ``` But what's the harm if the prefix doesn't exist? ### Additional Information Example use case. Assuming files having a prefix "my-archive/", if an S3 lifecycle rule is set to remove files under that prefix it will also remove the parent "folder" after the set time and the next mount will fail. Not requiring the folder to exist, or automatically creating it, would avoid this issue. #### Version of s3fs being used (s3fs --version) 1.89 #### Version of fuse being used (pkg-config --modversion fuse, rpm -qi fuse, dpkg -s fuse) 2.9.9 #### GNU/Linux Distribution, if applicable (cat /etc/os-release) FreeBSD 12.2-RELEASE-p9
kerem 2026-03-04 01:49:42 +03:00
  • closed this issue
  • added the
    need info
    label
Author
Owner

@gaul commented on GitHub (Aug 3, 2021):

Could you test with the latest master? I believe that this is a duplicate of #1460.

<!-- gh-comment-id:891794958 --> @gaul commented on GitHub (Aug 3, 2021): Could you test with the latest master? I believe that this is a duplicate of #1460.
Author
Owner

@bgdnlp commented on GitHub (Aug 3, 2021):

Well, that was quick :). I thought I don't see the full check in code, but didn't think to look further. I'm closing the ticket, thank you.

<!-- gh-comment-id:891831827 --> @bgdnlp commented on GitHub (Aug 3, 2021): Well, that was quick :). I thought I don't see the full check in code, but didn't think to look further. I'm closing the ticket, thank you.
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#890
No description provided.