GNU bug report logs - #17103
cp: "cp -al" doesn't copy symlinks, tries to link to them

Previous Next

Package: coreutils;

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

Date: Wed, 26 Mar 2014 18:09:01 UTC

Severity: normal

Full log


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

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Linda Walsh <coreutils <at> tlinx.org>, 17103 <at> debbugs.gnu.org
Subject: Re: bug#17103: regression: cp -al doesn't copy symlinks, but tries
 to link to them (fail)
Date: Wed, 26 Mar 2014 15:48:08 -0700
Linda Walsh wrote:
> Any idea how this managed to be broken?

My guess is that it's SELinux.  Try doing the following:

1.  Create 'dir' as before.
2.  As the user, run the following shell commands:

LC_ALL=C
export LC_ALL
ln dir/a/symfile dir/b

Assuming this fails, look at the output of:

strace ln dir/a/symfile dir/b

My guess is that you'll see something like this:

linkat(AT_FDCWD, "dir/a/symfile", AT_FDCWD, "dir/b/symfile", 0) = -1 
EPERM (Operation not permitted)

If so, the problem would appear to be in SELinux itself.




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.