coreutils icon indicating copy to clipboard operation
coreutils copied to clipboard

chown does not check for symlinks pointing to root when recursing through a tree

Open jaggededgedjustice opened this issue 4 years ago • 1 comments

Even if the --preserve-root option is set the chown command will attempt to follow a symlink pointing to root. This can be seen with the following test:

mkdir point-to-root
ln -s / point-to-root/root
chown -RHh --preserve-root 1000 point-to-root/

The GNU chown will exit immediately, while this chown will follow the symlink and start trying to change root.

jaggededgedjustice avatar Jan 31 '21 16:01 jaggededgedjustice

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jan 20 '23 04:01 stale[bot]