File tree 1 file changed +11
-6
lines changed
1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -1869,8 +1869,10 @@ impl Permissions {
1869
1869
///
1870
1870
/// # Note
1871
1871
///
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.
1874
1876
///
1875
1877
/// # Windows
1876
1878
///
@@ -1885,10 +1887,13 @@ impl Permissions {
1885
1887
/// # Unix (including macOS)
1886
1888
///
1887
1889
/// 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
+ ///
1892
1897
/// The [`PermissionsExt`] trait gives direct access to the permission bits but
1893
1898
/// also does not read ACLs.
1894
1899
///
You can’t perform that action at this time.
0 commit comments