We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8269be1 commit a9ecd0fCopy full SHA for a9ecd0f
library/std/src/os/unix/fs.rs
@@ -985,6 +985,10 @@ impl DirBuilderExt for fs::DirBuilder {
985
/// Changing the owner typically requires privileges, such as root or a specific capability.
986
/// Changing the group typically requires either being the owner and a member of the group, or
987
/// having privileges.
988
+///
989
+/// Be aware that changing owner clears the `suid` and `sgid` permission bits in most cases
990
+/// according to POSIX, usually even if the user is root. The sgid is not cleared when
991
+/// the file is non-group-executable.
992
///
993
/// If called on a symbolic link, this will change the owner and group of the link target. To
994
/// change the owner and group of the link itself, see [`lchown`].
0 commit comments