$ cp --no-preserve=mode --parents /sys/power/state /tmp/test/$ cp --no-preserve=mode --parents /sys/bus/cpu/drivers_autoprobe /tmp/test/The second of the two lines will fail withcp: cannot make directory /tmp/test/sys/bus: Permission deniedAnd the reason is that /tmp/test/sys is created without write permission (as is the original /sys); a normal mkdir /tmp/test/sys2 would not have done this:$ ls -la /tmp/test/total 32drwxr-xr-x  3 robert.siemer domain^users  4096 Oct 11 13:56 .drwxrwxrwt 13 root          root         20480 Oct 11 13:56 ..dr-xr-xr-x  3 robert.siemer domain^users  4096 Oct 11 13:56 sysdrwxr-xr-x  2 robert.siemer domain^users  4096 Oct 11 13:59 sys2How can I instruct cp to not preserve the mode, apart from --no-preserve=mode, which does not work as I believe it should...?Or which tool should I use to copy a list of files without preserving anything except symlinks?
Why does cp --no-preserve=mode preserves the mode? Alternative tools available?
permissions;symlink;cp;file copy
In case you are using GNU coreutils. This is a bug which is fixed in version 8.26.https://lists.gnu.org/archive/html/bug-coreutils/2016-08/msg00016.htmlSo the alternative tool would be an up-to-date coreutils, or for example rsync which is able to do that even with preserving permissions:$ rsync -a --relative  /sys/power/state /tmp/test$ rsync -a --relative  /sys/bus/cpu/drivers_autoprobe /tmp/test/Though I see rsync has other problems for this particular sysfs files, seersync option to disable verification?Another harsh workaround would be to chmod all the dirs after each cp command.$ find /tmp/test -type d -exec chmod $(umask -S) {} \;(The find/chmod command above would also not work for any combination of existing permissions and umask.) BTW you could report this bug to your Linux-Distribution and they might fix your 8.21 package via maintenance updates.