Recursively change ownership of this directory and kids
Implemented in terms of recursive_chown, see that for most up to date details.
- See also:
Changes ownership of path to the UID dst_uid, and GID dst_gid from the UID src_uid. The directory and all files and directories within it are changed. If a file is encountered that is not owned by src_uid or dst_uid, it is considered an error.
On an error, a message is reported to dprintf(D_ALWAYS) and false is returned. Otherwise true is returned.
|src_uid ||UID who is allowed to already own the file|
|dst_uid ||UID to change the file's ownership to. (Will silently skip a file already downed by this user)|
|dst_gid ||GID to change the file's ownership to.|
|non_root_okay ||Should we silently skip chown attempt and report success if this process isn't root? chown only works if this process has root permissions. If this process isn't root and non_root_okay is true (the default), this function will silently return true. If this process isn't root and non_root_okay is false, this function will fail. |
Definition at line 208 of file directory.cpp.
src_uid, dst_uid, dst_gid, non_root_okay);