You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rollup merge of #130289 - intgr-forks:Permissions-readonly-vs-unix-root, r=ChrisDenton
docs: Permissions.readonly() also ignores root user special permissions
The root user can write to files without any (write) permission bits set. But this is not taken into account by `std::fs::Permissions.readonly()`.
The rustdoc for `readonly()` also mentions shortcomings later:
> On Unix-based platforms this checks if any of the owner, group or others write permission bits are set. It does not check if the current user is in the file’s assigned group. It also does not check ACLs.
But since this part already clarifies how it works -- it checks write permission bits -- I think it's not necessary to repeat the root user shortcomings here.
0 commit comments