-
Notifications
You must be signed in to change notification settings - Fork 986
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmd/mount: add all-squash
option to squash all users
#4144
Conversation
@@ -141,6 +141,10 @@ func fuseFlags() []cli.Flag { | |||
Name: "root-squash", | |||
Usage: "mapping local root user (uid = 0) to another one specified as <uid>:<gid>", | |||
}, | |||
&cli.StringFlag{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should make flag non-default-permission
visible or enable it by default when squash all users. Otherwise, the kernel may deny users to modify files they created.
$ touch hello
touch: setting times of 'hello': Permission denied
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We probably have to always disable default permission to make the all-squash
work
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, there will be lots of access() and much slower.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But all-squash
can hardly work with default-permission
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When defaultPermission is disabled, we should make sure that the permission is checked in all the places, or access is called for them.
@@ -62,13 +62,14 @@ type Config struct { | |||
AccessLog string `json:",omitempty"` | |||
PrefixInternal bool | |||
HideInternal bool | |||
RootSquash *RootSquash `json:",omitempty"` | |||
UserSquash *UserSquash `json:",omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will it break anything (loading a JSON)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Usually it's dynamically loaded
No description provided.