Skip to content
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

Closed
wants to merge 2 commits into from
Closed

Conversation

SandyXSD
Copy link
Contributor

@SandyXSD SandyXSD commented Nov 7, 2023

No description provided.

@Hexilee Hexilee linked an issue Nov 7, 2023 that may be closed by this pull request
@@ -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{
Copy link
Contributor

@Hexilee Hexilee Nov 7, 2023

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

Copy link
Contributor Author

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

Copy link
Contributor

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.

Copy link
Contributor

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.

Copy link
Contributor

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"`
Copy link
Contributor

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)?

Copy link
Contributor Author

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

@SandyXSD SandyXSD marked this pull request as draft November 8, 2023 03:38
@davies davies closed this Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support all-squash
3 participants