Expand std::os::unix::fs::chown() doc with a warning
Include warning about losing setuid/gid when chowning, per POSIX.
This commit is contained in:
parent
8269be147b
commit
a9ecd0fa81
1 changed files with 4 additions and 0 deletions
|
@ -986,6 +986,10 @@ impl DirBuilderExt for fs::DirBuilder {
|
||||||
/// Changing the group typically requires either being the owner and a member of the group, or
|
/// Changing the group typically requires either being the owner and a member of the group, or
|
||||||
/// having privileges.
|
/// having privileges.
|
||||||
///
|
///
|
||||||
|
/// Be aware that changing owner clears the `suid` and `sgid` permission bits in most cases
|
||||||
|
/// according to POSIX, usually even if the user is root. The sgid is not cleared when
|
||||||
|
/// the file is non-group-executable.
|
||||||
|
///
|
||||||
/// If called on a symbolic link, this will change the owner and group of the link target. To
|
/// If called on a symbolic link, this will change the owner and group of the link target. To
|
||||||
/// change the owner and group of the link itself, see [`lchown`].
|
/// change the owner and group of the link itself, see [`lchown`].
|
||||||
///
|
///
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue