[GH-ISSUE #2392] access directory in a mounted bucket #1174

Open
opened 2026-03-04 01:51:56 +03:00 by kerem · 2 comments
Owner

Originally created by @lucdurb on GitHub (Dec 15, 2023).
Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/2392

Version of s3fs being used (s3fs --version)

s3fs is already the newest version (1.86-1)

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

Version: 2.9.9-3

Kernel information (uname -r)

5.15.0-87-generic

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

Ubuntu 20.04.6 LTS

How to run s3fs, if applicable

/etc/fstab

s3fs#bucket01 /localsystem/bucket01 fuse _netdev,ssl_verify_hostname=0,no_check_certificate,allow_other,use_cache=/tmp,passwd_file=/etc/credential/passwd_bucket01,url=https://mysubdomain.mydomain.com/ 0 0

s3fs syslog messages (grep s3fs /var/log/syslog, journalctl | grep s3fs, or s3fs outputs)

no error for this issue

Details about issue

I use s3fs to mount a bucket created on a on premises s3 storage compatible system (DataCore Swarm)
I have create a bucket with file and directory from GUI s3 storage system.
I can mount the bucket in /localsystem/bucket01, i can write a file, i can create a directory, i can delete an object.
If i create a directory from s3fs i have
drwxr-xr-x testfolder
i can access in this folder and i can create or delet e object.

If i create a folder from G
UI s3 storage system i have
-rwxr-x--- testfolder2
and in this case, from s3fs, i can't access to the folder because for linux server is a file.

If i try to access with GUI s3 storsge system in testfolder or testfolder2, i can access, put and get object in this 2 folders.
From GUI i find:
testfolder2 application/x-directory (created from s3fs)
testfolder application/directory (created from gui)

Is there any parameters to use for this issue?
Is possible set s3sf to create directory with application/directory as type instead of application/x-directory?

Originally created by @lucdurb on GitHub (Dec 15, 2023). Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/2392 #### Version of s3fs being used (`s3fs --version`) s3fs is already the newest version (1.86-1) #### Version of fuse being used (`pkg-config --modversion fuse`, `rpm -qi fuse` or `dpkg -s fuse`) Version: 2.9.9-3 #### Kernel information (`uname -r`) 5.15.0-87-generic #### GNU/Linux Distribution, if applicable (`cat /etc/os-release`) Ubuntu 20.04.6 LTS #### How to run s3fs, if applicable <!-- Describe the s3fs "command line" or "/etc/fstab" entry used. --> /etc/fstab <!-- Executed command line or /etc/fastab entry --> s3fs#bucket01 /localsystem/bucket01 fuse _netdev,ssl_verify_hostname=0,no_check_certificate,allow_other,use_cache=/tmp,passwd_file=/etc/credential/passwd_bucket01,url=https://mysubdomain.mydomain.com/ 0 0 #### s3fs syslog messages (`grep s3fs /var/log/syslog`, `journalctl | grep s3fs`, or `s3fs outputs`) no error for this issue ### Details about issue I use s3fs to mount a bucket created on a on premises s3 storage compatible system (DataCore Swarm) I have create a bucket with file and directory from GUI s3 storage system. I can mount the bucket in /localsystem/bucket01, i can write a file, i can create a directory, i can delete an object. If i create a directory from s3fs i have drwxr-xr-x testfolder i can access in this folder and i can create or delet e object. If i create a folder from G UI s3 storage system i have -rwxr-x--- testfolder2 and in this case, from s3fs, i can't access to the folder because for linux server is a file. If i try to access with GUI s3 storsge system in testfolder or testfolder2, i can access, put and get object in this 2 folders. From GUI i find: testfolder2 application/x-directory (created from s3fs) testfolder application/directory (created from gui) Is there any parameters to use for this issue? Is possible set s3sf to create directory with application/directory as type instead of application/x-directory?
Author
Owner

@hanqingwu commented on GitHub (Dec 29, 2023):

i lookinto to src , so i get s3fs-fuse/src/metaheader.cpp
maybe you can try to modify this , add application/directory
image

<!-- gh-comment-id:1871703545 --> @hanqingwu commented on GitHub (Dec 29, 2023): i lookinto to src , so i get s3fs-fuse/src/metaheader.cpp maybe you can try to modify this , add application/directory ![image](https://github.com/s3fs-fuse/s3fs-fuse/assets/7521141/3cfb2849-9124-4a73-8178-5357e03c1508)
Author
Owner

@ggtakec commented on GitHub (Feb 12, 2024):

@lucdurb
For example, when s3fs creates a dir directory(folder), it creates an object called dir/.
When you create a dir/file object using the SDK(such as aws cli), objects called dir or dir/ are not created.
This difference was causing problems like this issue.
Your version of s3fs is old and is highly affected by this issue. (If the s3fs you are using has an option such as compat_dir, you can try it. You can check it with s3fs -h etc.)

If possible, please use the latest s3fs.
Thanks in advance for your assistance.

<!-- gh-comment-id:1938244195 --> @ggtakec commented on GitHub (Feb 12, 2024): @lucdurb For example, when s3fs creates a `dir` directory(folder), it creates an object called `dir/`. When you create a `dir/file` object using the SDK(such as aws cli), objects called `dir` or `dir/` are not created. This difference was causing problems like this issue. Your version of s3fs is old and is highly affected by this issue. (If the s3fs you are using has an option such as `compat_dir`, you can try it. You can check it with `s3fs -h` etc.) If possible, please use the latest s3fs. Thanks in advance for your assistance.
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#1174
No description provided.