Unable to rsync files from RHEL 7 to RHEL 6 with SELinux enabled

Latest response

If i try to rsync files from a RHEL 7 to a RHEL 6 with SELinux enabled on both machines and with -XA flags on rsync I get this error:
rsync: rsync_xal_set: lsetxattr("etc/.pwd.lock","security.selinux") failed: Invalid argument (22)

The problem seems to be related to the fact that RHEL 7 has selinux contexts that don't exist on RHEL 6.

Is there any way to get around this other than turning of SELinux on the RHEL 6?

Responses

You may be able to use the rscyn --ingnore-non-existing option.

But I want those files also to be copied over. Preferably with the correct context.

Is there any way to tell SELinux to accept unknown contexts or turn of checking contexts only on a certain folder?

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.