GNU bug report logs - #17138
cp: how to respect target symlinks?

Previous Next

Package: coreutils;

Reported by: Linda Walsh <coreutils <at> tlinx.org>

Date: Sat, 29 Mar 2014 02:04:01 UTC

Severity: normal

To reply to this bug, email your comments to 17138 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-coreutils <at> gnu.org:
bug#17138; Package coreutils. (Sat, 29 Mar 2014 02:04:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Linda Walsh <coreutils <at> tlinx.org>:
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Sat, 29 Mar 2014 02:04:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Linda Walsh <coreutils <at> tlinx.org>
To: bug-coreutils <at> gnu.org
Subject: how to respect target symlinks w/cp?  problem?
Date: Fri, 28 Mar 2014 19:02:27 -0700
I was wanting to copy a source tree
to a target where the target had some symlink'd dirs..


/arch64/> \cp -r usr/. ../usr/.
cp: cannot overwrite non-directory `../usr/././share' with directory `usr/./share'

I have a setup on a bi-arch machine
where /usr/share under each 'arch' points to a common
/common/share/... I see options in the manpage for
having cp respect the SOURCE symlinks, but
see no option to have it respect symlinks in the target.

Note: If I wanted the target's symlinks to be overwritten
or ignored, I would use "cp -fa" that would overwrite
the symlinks (I think) and create them as directories,
but barring "a", why doesn't it just follow the path?

The purpose of symlinks was to allow seamless redirection,
but now more utils seem to be ignoring that usage just
like on a security level group access is being increasingly
ignored.

tar just overwrites the symlink with the dir w/o warning...






Information forwarded to bug-coreutils <at> gnu.org:
bug#17138; Package coreutils. (Mon, 31 Mar 2014 04:08:01 GMT) Full text and rfc822 format available.

Message #8 received at 17138 <at> debbugs.gnu.org (full text, mbox):

From: Linda Walsh <coreutils <at> tlinx.org>
To: 17138 <at> debbugs.gnu.org
Subject: Re: bug#17138: how to respect target symlinks w/cp?  problem?
Date: Sun, 30 Mar 2014 21:07:18 -0700
Is some server bottled up somewhere? this bug was the last one
I saw come through...

Linda Walsh wrote:
> I was wanting to copy a source tree
> to a target where the target had some symlink'd dirs..
> 
> 
> /arch64/> \cp -r usr/. ../usr/.
> cp: cannot overwrite non-directory `../usr/././share' with directory 
> `usr/./share'
> 
> I have a setup on a bi-arch machine
> where /usr/share under each 'arch' points to a common
> /common/share/... I see options in the manpage for
> having cp respect the SOURCE symlinks, but
> see no option to have it respect symlinks in the target.
> 
> Note: If I wanted the target's symlinks to be overwritten
> or ignored, I would use "cp -fa" that would overwrite
> the symlinks (I think) and create them as directories,
> but barring "a", why doesn't it just follow the path?
> 
> The purpose of symlinks was to allow seamless redirection,
> but now more utils seem to be ignoring that usage just
> like on a security level group access is being increasingly
> ignored.
> 
> tar just overwrites the symlink with the dir w/o warning...
> 
> 
> 
> 
> 




Changed bug title to 'cp: how to respect target symlinks?' from 'how to respect target symlinks w/cp? problem?' Request was from Assaf Gordon <assafgordon <at> gmail.com> to control <at> debbugs.gnu.org. (Fri, 11 Jan 2019 09:07:02 GMT) Full text and rfc822 format available.

This bug report was last modified 6 years and 157 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.