File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -1869,8 +1869,10 @@ impl Permissions {
18691869 ///
18701870 /// # Note
18711871 ///
1872- /// This function does not take Access Control Lists (ACLs) or Unix group
1873- /// membership into account.
1872+ /// This function does not take Access Control Lists (ACLs), Unix group
1873+ /// membership and other nuances into account.
1874+ /// Therefore the return value of this function cannot be relied upon
1875+ /// to predict whether attempts to read or write the file will actually succeed.
18741876 ///
18751877 /// # Windows
18761878 ///
@@ -1885,10 +1887,13 @@ impl Permissions {
18851887 /// # Unix (including macOS)
18861888 ///
18871889 /// On Unix-based platforms this checks if *any* of the owner, group or others
1888- /// write permission bits are set. It does not check if the current
1889- /// user is in the file's assigned group. It also does not check ACLs.
1890- /// Therefore the return value of this function cannot be relied upon
1891- /// to predict whether attempts to read or write the file will actually succeed.
1890+ /// write permission bits are set. It does not consider anything else, including:
1891+ ///
1892+ /// * Whether the current user is in the file's assigned group.
1893+ /// * Permissions granted by ACL.
1894+ /// * That `root` user can write to files that do not have any write bits set.
1895+ /// * Writable files on a filesystem that is mounted read-only.
1896+ ///
18921897 /// The [`PermissionsExt`] trait gives direct access to the permission bits but
18931898 /// also does not read ACLs.
18941899 ///
You can’t perform that action at this time.
0 commit comments