mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2026-04-25 13:26:00 +03:00
[GH-ISSUE #1958] Should mknod be able to create non-regular files under s3fs mount? #990
Labels
No labels
bug
bug
dataloss
duplicate
enhancement
feature request
help wanted
invalid
need info
performance
pull-request
question
question
testing
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/s3fs-fuse#990
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ggtakec on GitHub (Jun 10, 2022).
Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/1958
Currently, creating a regular file with
mknodworks because FUSE calls thecreatehook.(See, #1934, #1957)However, I would like to consider whether it should support files(devices) in other modes(
CHARACTER,BLOCK,FIFO,SOCK) that can be created withmknod.At present,
FIFOandSOCKcan apparently create a file and have a corresponding correct mode in stat.However, I don't think it can be operated according to the purpose.
Also,
CHARACTERandBLOCKare not even able to set the major and minor numbers of the device, so it looks like the file was created, but the major and minor numbers are always 0.If
CHARACTERandBLOCKare supported, the value ofdev_tmust be included in the meta header.And this file is also not internally implemented.
I would like to consider whether these special files should be supported for mounted distributed storage.(ex. use case, required behavior, etc.)
s3fs creates/uses a local cache file when specified the
use_cacheoption, but this cache file is always a regular file.If we support all file type, we need to create cache files as same as file type by mknod.
In any case, I'd love to know if user really need support for these file types.
And if anyone know the use case, I would like to know it too.
@gaul Please let me know what you think.
@gaul commented on GitHub (Jun 19, 2022):
I think this should be OK. I worry about situations where a root mounts s3fs and a different user creates a device file. We should be careful to make sure that we don't allow unexpected permission elevation.
@ggtakec commented on GitHub (Jun 19, 2022):
Yes, I'm worried about that too.
And above all, these files(devices) have not been implemented(Read/Write), which makes them meaningless to s3fs users.
I plan to change the processing of these mknods so that an error occurs.
If it shouldn't be an error, please let me know.