[GH-ISSUE #544] Prefix Only Going One Level #310

Closed
opened 2026-03-04 01:44:16 +03:00 by kerem · 6 comments
Owner

Originally created by @herriojr on GitHub (Mar 11, 2017).
Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/544

I am attempting to use a prefix to mount into a specific folder in S3. It works when I use a top level folder such as /root/ but not when I use /root/subfolder/ even though the folder does exist.

Failed Command

>> s3fs my-bucket:/root/subfolder/ /home -o allow_other -o umask=022 -o endpoint=us-west-2 -o passwd_file=/root/passwd.s3fs -f -d -d 
[CRT] s3fs.cpp:set_s3fs_log_level(253): change debug level from [CRT] to [INF] 
[INF]     s3fs.cpp:set_moutpoint_attribute(4151): PROC(uid=0, gid=0) - MountPoint(uid=0, gid=0, mode=40755)
FUSE library version: 2.9.2
nullpath_ok: 0
nopath: 0
utime_omit_ok: 0
unique: 1, opcode: INIT (26), nodeid: 0, insize: 56, pid: 0
INIT: 7.26
flags=0x001ffffb
max_readahead=0x00020000
[CRT] s3fs.cpp:s3fs_init(3334): init v1.80(commit:36917f7) with OpenSSL
[INF] s3fs.cpp:s3fs_check_service(3708): check services.
[INF]       curl.cpp:CheckBucket(2860): check a bucket.
[INF]       curl.cpp:prepare_url(4175): URL is http://s3.amazonaws.com/my-bucket/root/subfolder/
[INF]       curl.cpp:prepare_url(4207): URL changed is http://my-bucket.s3.amazonaws.com/root/subfolder/
[INF]       curl.cpp:insertV4Headers(2237): computing signature [GET] [/root/subfolder/] [] []
[INF]       curl.cpp:url_to_host(100): url is http://s3.amazonaws.com
[INF]       curl.cpp:RequestPerform(1932): HTTP response code 404 was returned, returning ENOENT
[ERR] curl.cpp:CheckBucket(2899): 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>root/subfolder/</Key><RequestId>MYREQUESTID</RequestId><HostId>HOST_ID</HostId></Error>
[CRT] s3fs.cpp:s3fs_check_service(3769): bucket not found - result of checking service.
[ERR] s3fs.cpp:s3fs_exit_fuseloop(3324): Exiting FUSE event loop due to errors

Successful Command

>> s3fs my-bucket:/root/ /home -o allow_other -o umask=022 -o endpoint=us-west-2 -o passwd_file=/root/passwd.s3fs -f -d -d 
[CRT] s3fs.cpp:set_s3fs_log_level(253): change debug level from [CRT] to [INF] 
[INF]     s3fs.cpp:set_moutpoint_attribute(4151): PROC(uid=0, gid=0) - MountPoint(uid=0, gid=0, mode=40755)
FUSE library version: 2.9.2
nullpath_ok: 0
nopath: 0
utime_omit_ok: 0
unique: 1, opcode: INIT (26), nodeid: 0, insize: 56, pid: 0
INIT: 7.26
flags=0x001ffffb
max_readahead=0x00020000
[CRT] s3fs.cpp:s3fs_init(3334): init v1.80(commit:36917f7) with OpenSSL
[INF] s3fs.cpp:s3fs_check_service(3708): check services.
[INF]       curl.cpp:CheckBucket(2860): check a bucket.
[INF]       curl.cpp:prepare_url(4175): URL is http://s3.amazonaws.com/my-bucket/root/
[INF]       curl.cpp:prepare_url(4207): URL changed is http://my-bucket.s3.amazonaws.com/root/
[INF]       curl.cpp:insertV4Headers(2237): computing signature [GET] [/root/] [] []
[INF]       curl.cpp:url_to_host(100): url is http://s3.amazonaws.com
[INF]       curl.cpp:RequestPerform(1910): HTTP response code 200
[INF]   s3fs.cpp:remote_mountpath_exists(2812): [path=/root]
   INIT: 7.19
   flags=0x00000019
   max_readahead=0x00020000
   max_write=0x00020000
   max_background=0
   congestion_threshold=0
   unique: 1, success, outsize: 40

Showing that it does exist

>> aws s3 ls s3://my-bucket/
                           PRE /
                           PRE root/
>> aws s3 ls s3://my-bucket/root/
                           PRE subfolder/
2017-03-09 16:32:15          0
Originally created by @herriojr on GitHub (Mar 11, 2017). Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/544 I am attempting to use a prefix to mount into a specific folder in S3. It works when I use a top level folder such as /root/ but not when I use /root/subfolder/ even though the folder does exist. Failed Command ```bash >> s3fs my-bucket:/root/subfolder/ /home -o allow_other -o umask=022 -o endpoint=us-west-2 -o passwd_file=/root/passwd.s3fs -f -d -d [CRT] s3fs.cpp:set_s3fs_log_level(253): change debug level from [CRT] to [INF] [INF] s3fs.cpp:set_moutpoint_attribute(4151): PROC(uid=0, gid=0) - MountPoint(uid=0, gid=0, mode=40755) FUSE library version: 2.9.2 nullpath_ok: 0 nopath: 0 utime_omit_ok: 0 unique: 1, opcode: INIT (26), nodeid: 0, insize: 56, pid: 0 INIT: 7.26 flags=0x001ffffb max_readahead=0x00020000 [CRT] s3fs.cpp:s3fs_init(3334): init v1.80(commit:36917f7) with OpenSSL [INF] s3fs.cpp:s3fs_check_service(3708): check services. [INF] curl.cpp:CheckBucket(2860): check a bucket. [INF] curl.cpp:prepare_url(4175): URL is http://s3.amazonaws.com/my-bucket/root/subfolder/ [INF] curl.cpp:prepare_url(4207): URL changed is http://my-bucket.s3.amazonaws.com/root/subfolder/ [INF] curl.cpp:insertV4Headers(2237): computing signature [GET] [/root/subfolder/] [] [] [INF] curl.cpp:url_to_host(100): url is http://s3.amazonaws.com [INF] curl.cpp:RequestPerform(1932): HTTP response code 404 was returned, returning ENOENT [ERR] curl.cpp:CheckBucket(2899): 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>root/subfolder/</Key><RequestId>MYREQUESTID</RequestId><HostId>HOST_ID</HostId></Error> [CRT] s3fs.cpp:s3fs_check_service(3769): bucket not found - result of checking service. [ERR] s3fs.cpp:s3fs_exit_fuseloop(3324): Exiting FUSE event loop due to errors ``` Successful Command ```bash >> s3fs my-bucket:/root/ /home -o allow_other -o umask=022 -o endpoint=us-west-2 -o passwd_file=/root/passwd.s3fs -f -d -d [CRT] s3fs.cpp:set_s3fs_log_level(253): change debug level from [CRT] to [INF] [INF] s3fs.cpp:set_moutpoint_attribute(4151): PROC(uid=0, gid=0) - MountPoint(uid=0, gid=0, mode=40755) FUSE library version: 2.9.2 nullpath_ok: 0 nopath: 0 utime_omit_ok: 0 unique: 1, opcode: INIT (26), nodeid: 0, insize: 56, pid: 0 INIT: 7.26 flags=0x001ffffb max_readahead=0x00020000 [CRT] s3fs.cpp:s3fs_init(3334): init v1.80(commit:36917f7) with OpenSSL [INF] s3fs.cpp:s3fs_check_service(3708): check services. [INF] curl.cpp:CheckBucket(2860): check a bucket. [INF] curl.cpp:prepare_url(4175): URL is http://s3.amazonaws.com/my-bucket/root/ [INF] curl.cpp:prepare_url(4207): URL changed is http://my-bucket.s3.amazonaws.com/root/ [INF] curl.cpp:insertV4Headers(2237): computing signature [GET] [/root/] [] [] [INF] curl.cpp:url_to_host(100): url is http://s3.amazonaws.com [INF] curl.cpp:RequestPerform(1910): HTTP response code 200 [INF] s3fs.cpp:remote_mountpath_exists(2812): [path=/root] INIT: 7.19 flags=0x00000019 max_readahead=0x00020000 max_write=0x00020000 max_background=0 congestion_threshold=0 unique: 1, success, outsize: 40 ``` Showing that it does exist ```bash >> aws s3 ls s3://my-bucket/ PRE / PRE root/ >> aws s3 ls s3://my-bucket/root/ PRE subfolder/ 2017-03-09 16:32:15 0
kerem closed this issue 2026-03-04 01:44:17 +03:00
Author
Owner

@ErikDahlinghaus commented on GitHub (Mar 29, 2017):

I'm experiencing the same issue.

<!-- gh-comment-id:290138425 --> @ErikDahlinghaus commented on GitHub (Mar 29, 2017): I'm experiencing the same issue.
Author
Owner

@RobbKistler commented on GitHub (Mar 29, 2017):

The FUSE stackable module subdir might be a workaround

-omodules=subdir,subdir=/root/subfolder
<!-- gh-comment-id:290239651 --> @RobbKistler commented on GitHub (Mar 29, 2017): The FUSE stackable module `subdir` might be a workaround ``` -omodules=subdir,subdir=/root/subfolder ```
Author
Owner

@ErikDahlinghaus commented on GitHub (Mar 29, 2017):

Thanks Robb, I haven't tried this yet as goofys is solving my needs for the time being.

<!-- gh-comment-id:290247211 --> @ErikDahlinghaus commented on GitHub (Mar 29, 2017): Thanks Robb, I haven't tried this yet as goofys is solving my needs for the time being.
Author
Owner

@ggtakec commented on GitHub (Apr 2, 2017):

@herriojr
In my test it is working.

s3fs <mybucket>:/dir1/dir2/ /mnt/s3 -o allow_other,dbglevel=info,curldbg -f

I want to know about detail information which is got by dbglevel(as same as -d ption) and curldbg.
(you can see "dbglevel=info,curldbg -f" in my test command)
I think the logs help us to slove this problem.

Thanks in advance for your assistance.

<!-- gh-comment-id:290975777 --> @ggtakec commented on GitHub (Apr 2, 2017): @herriojr In my test it is working. ``` s3fs <mybucket>:/dir1/dir2/ /mnt/s3 -o allow_other,dbglevel=info,curldbg -f ``` I want to know about detail information which is got by dbglevel(as same as -d ption) and curldbg. (you can see "dbglevel=info,curldbg -f" in my test command) I think the logs help us to slove this problem. Thanks in advance for your assistance.
Author
Owner

@frankrod commented on GitHub (Sep 20, 2017):

It's working for me in version 1.82 This is how I did it.
s3fs myBucket:/root/firstLvl/ mountFolder/ -o passwd_file=myPasswordFile -o umask=00000

<!-- gh-comment-id:330746630 --> @frankrod commented on GitHub (Sep 20, 2017): It's working for me in version 1.82 This is how I did it. `s3fs myBucket:/root/firstLvl/ mountFolder/ -o passwd_file=myPasswordFile -o umask=00000`
Author
Owner

@ggtakec commented on GitHub (Mar 30, 2019):

We kept this issue open for a long time.
Is this problem continuing?
We launch new version 1.86, which fixed some problem(bugs).
Please use the latest version.
I will close this, but if the problem persists, please reopen or post a new issue.

<!-- gh-comment-id:478228380 --> @ggtakec commented on GitHub (Mar 30, 2019): We kept this issue open for a long time. Is this problem continuing? We launch new version 1.86, which fixed some problem(bugs). Please use the latest version. I will close this, but if the problem persists, please reopen or post a new issue.
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#310
No description provided.