[EMAIL PROTECTED]:/tmp# ls -Z /etc/shadow system_u:object_r:shadow_t /etc/shadow [EMAIL PROTECTED]:/tmp# cp --preserve=all /etc/shadow . [EMAIL PROTECTED]:/tmp# ls -Z shadow system_u:object_r:shadow_t shadow
According to the man page for cp -a is the same as -dpR which turns out to mean: --no-dereference --preserve=links --preserve=mode,ownership,timestamps --recursive Which doesn't include --preserve=context It is my feeling that it should be included in the -p option. The reasoning being that the context is analogous to mode and ownership which -p normally preserves. -- "cp" command doesn't preserve selinux context https://bugs.launchpad.net/bugs/203433 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs