bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#17103: regression: cp -al doesn't copy symlinks, but tries to link t


From: Linda Walsh
Subject: bug#17103: regression: cp -al doesn't copy symlinks, but tries to link to them (fail)
Date: Wed, 26 Mar 2014 17:16:16 -0700
User-agent: Thunderbird



Paul Eggert wrote:
I've managed to reproduce the problem on Fedora 20. It indeed is a kernel thing having to do with security. Not only can 'cp' not create hardlinks to symlinks; it also can't create hardlinks to regular files.
----
Actually, we've already verified that creating hardlinks to regular
files works because I have write access to the file I am linking to.

I also have write access to the symlink if you look at the mode-bits.

Pádraig Brady also verified this.

There is more than one problem or issue here.

The part that is in coreutils is that if for some reason a symlink
cannot be linked to, then the symlink should be copied (not what
the symlink is pointing to, but the actual contents of the symlink
inode -- i.e. the redirection path).  Like directories copied with
cp -al, symlinks would be owned by the user if this situation comes
up -- but they would still be functional.

The kernel part of this are the changes associated with
/proc/sys/fs/protected_{hard,soft}links -- which seem to be on by default
resulting in incompatible behavior.  Pádraig referenced a blog
where these new behaviors were justifiable on  the theory that
sys admins might be easily tricked into doing random chowns of all
files for users on request without investigating or wondering why...
*ahem*...yah...







reply via email to

[Prev in Thread] Current Thread [Next in Thread]