|
From: | Paul Eggert |
Subject: | bug#17103: regression: cp -al doesn't copy symlinks, but tries to link to them (fail) |
Date: | Wed, 26 Mar 2014 16:58:36 -0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 |
Not much that coreutils can do about it, as far as I can see, as it's a kernel issue.
You can work around the problem by running 'cp' (or 'ln' etc.) as root.Here's an example, where I am running as a regular (non-root) user that is not in the 'root' group:
$ find dir/a -ls 5300828 0 drwxrwxr-x 2 root root 80 Mar 26 16:50 dir/a5338695 4 -rw-r--r-- 1 root root 5 Mar 26 16:50 dir/a/data 5300831 0 lrwxrwxrwx 1 root root 9 Mar 26 11:20 dir/a/symfile -> ../b/file
$ mkdir d $ ln dir/a/data dln: failed to create hard link ‘d/data’ => ‘dir/a/data’: Operation not permitted
$ ln dir/a/symfile dln: failed to create hard link ‘d/symfile’ => ‘dir/a/symfile’: Operation not permitted
[Prev in Thread] | Current Thread | [Next in Thread] |