For actions chown, chmod and utime, chown is performed with elevated privileges. process' user and group id will be
set to target's owner and group id and for other actions it will be set
to owner and group id target's parent directory.
As a special case,For chmod and utime, the uid and gid of the target file is considered when relinquishing privileges. for rename action the owner and group id of parent dirFor
of the new file is also checked. If it's same as target's then privileges
are dropped accordingly otherwise privileges are preserved the remaining actions, the uid and gid of target's parent directory is considered.