Cp(1) doesn't correctly copy extended attributes for read-only files:

touch foo
setfattr -n user.key -v value foo
chmod a-w foo
cp --preserve=xattr foo bar
cp: setting attribute `user.key' for `user.key': Permission denied

If one uses "cp -a" instead, it simply strips the metadata and doesn't complain.


Reply via email to