You are not logged in.

#1 2020-10-24 14:32:40

ratcheer
Member
Registered: 2011-10-09
Posts: 912

[Solved] btrfs send gives selinux error, but no selinux commands work

I created a new location for my btrfs snapshots on my HDD, From the old location, btrfs send always ran successfully to send my snapshots to my backup drive. But, sending from the new location gives this error:

ERROR: lsetxattr o257-129-0 security.selinux=unconfined_u:object_r:unlabeled_t:s0 failed: No such file or directory

The send appears to have been successful, but I am not sure everything was handled correctly. Since this is for my backups, I want to be sure they are correct.

So, I was unaware that selinux was even active on this system. And sure enough, all of the selinux commands I try to use to troubleshoot this are not found. sestatus, getenforce, and restorecon are all not found.

If I have selinux, why are its commands not found? If I don't have it, why am I getting the error?

Last edited by ratcheer (2020-10-24 15:21:36)

Offline

#2 2020-10-24 15:20:52

ratcheer
Member
Registered: 2011-10-09
Posts: 912

Re: [Solved] btrfs send gives selinux error, but no selinux commands work

Ok, I had an idea. I ran a full send of the new snapshot to the backup drive, and it completed without an error. Maybe there was just some issue with the incremental send because of the change of the source location.

The next time I run an incremental send, I'll know for sure.

But I still don't understand how there was an selinux error without selinux. It must be something in the kernel.

Last edited by ratcheer (2020-10-24 15:22:44)

Offline

#3 2020-10-24 17:51:40

xerxes_
Member
Registered: 2018-04-29
Posts: 665

Re: [Solved] btrfs send gives selinux error, but no selinux commands work

So what kernel do you use: from arch distro or custom compiled? What's the output of command 'journalctl -b -g selinux'?

Offline

#4 2020-10-24 18:00:09

ratcheer
Member
Registered: 2011-10-09
Posts: 912

Re: [Solved] btrfs send gives selinux error, but no selinux commands work

I'm using the standard Arch distro kernel, 5.9.1-arch1-1

 journalctl -b -g selinux
-- Logs begin at Thu 2020-09-10 16:03:40 CDT, end at Sat 2020-10-24 12:57:05 CDT. --
Oct 24 08:07:31 tux systemd[1]: systemd 246.6-1-arch running in system mode. (+PAM +AUDIT -SELINUX -IMA -APPARMOR +SMACK -SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +ZSTD +SECCOMP +BLKID +ELFUTILS +KMOD +IDN2 -IDN +PCRE2 default-hierarchy=hybrid)

Offline

#5 2020-10-24 18:08:05

xerxes_
Member
Registered: 2018-04-29
Posts: 665

Re: [Solved] btrfs send gives selinux error, but no selinux commands work

So selinux is not enabled (at least not on that system, maybe it is enabled on your other system, which is receiving snapshot).

Offline

#6 2020-10-24 19:14:56

ratcheer
Member
Registered: 2011-10-09
Posts: 912

Re: [Solved] btrfs send gives selinux error, but no selinux commands work

It was all on the same system. The backup drive is an external drive that is mounted only when backups are being sent to (or, sometimes, from) it.

Offline

Board footer

Powered by FluxBB