Skip to content

Commit 3408dc1

Browse files
authored
Update chown help with a link and adding cap warning
Linked to chown(2) manpage on the web which expands on chown call behaviour.
1 parent a9ecd0f commit 3408dc1

File tree

1 file changed

+2
-1
lines changed
  • library/std/src/os/unix

1 file changed

+2
-1
lines changed

library/std/src/os/unix/fs.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -988,7 +988,8 @@ impl DirBuilderExt for fs::DirBuilder {
988988
///
989989
/// Be aware that changing owner clears the `suid` and `sgid` permission bits in most cases
990990
/// according to POSIX, usually even if the user is root. The sgid is not cleared when
991-
/// the file is non-group-executable.
991+
/// the file is non-group-executable. See: <https://www.man7.org/linux/man-pages/man2/chown.2.html>
992+
/// This call may also clear file capabilities, if there was any.
992993
///
993994
/// If called on a symbolic link, this will change the owner and group of the link target. To
994995
/// change the owner and group of the link itself, see [`lchown`].

0 commit comments

Comments
 (0)