-
Notifications
You must be signed in to change notification settings - Fork 259
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
Group inheritance (SGID bit) does not work in -allow_other mode #338
Comments
Something like this would fix part of the issue (UNTESTED!), but we also need additional code for all other file objects. Are you sure we don't want to juts adjust effective permissions? ;) |
Not anymore ;) |
For comparison, this would be a fix for |
The approach in my previous draft patch has the disadvantage that it also affects A slightly different approach based on changing effective permissions is shown in this patch: http://ix.io/1xY2. By adding new syscallcompat wrappers, we can put all the ugly code in a separate file and minimize the region during which we have to lock What are your thoughts? Does using effective permissions make things sufficiently easier, or should we stick to the previous |
Revert commit b22cc03. Instead of manually adjusting the user and mode after creating the file, adjust effective permissions and let the kernel deal with it. Related to rfjakob#338.
Revert commit fcaca5f. Instead of manually adjusting the user and mode after creating the directory, adjust effective permissions and let the kernel deal with it. Related to rfjakob#338.
Instead of manually adjusting the user and mode after creating the device file, adjust effective permissions and let the kernel deal with it. Related to rfjakob#338.
Instead of manually adjusting the user after creating the symlink, adjust effective permissions and let the kernel deal with it. Related to rfjakob#338.
I believe this was fixed by PR #340 . xfstests generic/314 is happy:
|
The issue noticed in fcaca5f#r31889375 reveals a much larger problem.
Two things are important to make group inheritance work correctly:
The first point never worked due to the explicit
Fchown*
we execute whenPreserveOwner
is enabled. The second point sometimes worked, but this was more pure luck than intentional. For directories created without write/execute permission it never worked due to the explicitFchmod
we executed in that case.Even with
PreserveOwner
disabled, group inheritance did not always work (e.g., in the case where we execute an explicitFchmod
on a newly created directory).The text was updated successfully, but these errors were encountered: