Skip to content

Commit c45c46c

Browse files
grinapogitbot
authored and
gitbot
committed
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 1fc9872 commit c45c46c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

std/src/os/unix/fs.rs

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

0 commit comments

Comments
 (0)