mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2026-04-25 13:26:00 +03:00
[GH-ISSUE #522] mp_umask appears to not be recursive and s3fs_mkdir seems to also disregard mp_umask #291
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#291
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 @BAGELreflex on GitHub (Jan 18, 2017).
Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/522
Setup
I am mounting my bucket with the following command (plus some added debugging while working through this issue).
Server environment
Usage
The bucket mounts fine, I can read/write as owner (root) and group (apache).
I am working on integrating file uploads by user to be stored in my S3 bucket via s3fs. The application is written in PHP. Part of the application needs to be able to create directories inside the bucket. I am doing this via PHP's built-in mkdir().
Debugging
Here is more debugging info available after issuing the s3fs command to mount the bucket.
Question
Per UMASK documentation I would expect a umask of
007to bedrwxrwx---recursively. Perhaps I misunderstand what the umask is for? My mountpoint permissions are correct, so the umask should recurse through all children, is my understanding.My main issue is when I create a directory via PHP's
mkdir()it gets created with the default permissions of755. This can be seen from the debugging output:I can understand PHP not being able to set permissions via
mkdir()'s second parameter (which sets the permission), however I do not understand why s3fs would disregard themp_umaskwhen creating this new directory. I cannot create a sub-directory in the new directory due to the755permissions given to the newly created directory.Any help or explanation would be greatly appreciated!
@ggtakec commented on GitHub (Jan 29, 2017):
@BAGELreflex
The mp_umask and umask options are different.
The umask option affects operations below the mount point.
This is the same as the mount command umask. (See mount command man page)
In s3fs, there was a request to apply the umask to the mount point directory.
The option to achieve that is the mp_umask option.
The umask value specified with this option affects only the directory of the mount point.
If you want umask to be applied to the file/directory under the mount point, specify "umask=007".
Thanks.
@ggtakec commented on GitHub (Mar 30, 2019):
We kept this issue open for a long time.
I will close this, but if the problem persists, please reopen or post a new issue.