Re: sys_chown() hits symlinks

Linus Torvalds (
18 Jan 1998 21:35:01 GMT

In article <69sqr7$f3$>,
H. Peter Anvin <> wrote:
>Incorrect. Neither the owner nor the mode of a symlink have any
>effects, whatsoever.

Actually, the owner of a symlink _does_ matter for sticky directories,
which is why you really want to be able to change the owner.

Essentially, if you cannot change the owner of a symlink, you cannot
reliably do a "chown -R" on a directory tree. Imagine being a sysadmin
and moving a person from one uid or group to another..

In short: either you have to have "lchown()" or your "chown()" has to
act on the symlink rather than on the target. Linux takes the second
approach, which is the traditional one.