I’m copying some files (rsync -aHAX
) I backed up before I installed ublue to a btrfs drive after booting into ublue, and am getting permission denied errors when I try to e.g. just cat one of the files. There were selinux errors while copying, which I found was caused by rsync trying to remove permissions an the destination files, since those permissions were not present on the backup. I also found an option --filter='-x security.selinux'
, to stop rsync from tryng to remove those permissions, so I stopped copying and restarted with that option.
I can copy from the backup to a folder in my home folder without any problems. The source and destination are both btrfs file systems mounted in /mnt
In case the above isn’t clear:
Back up files to a btrfs filesystem from Debian
Install Bluefin
Create new btrfs filesystem
rsync -aHAX from backup to new btrfs
many selinux errors
added filter
no errors
can’t access some files in the new fs, permission denied (these may be the ones copied before I added the filter).
Should I perhaps setenforce 0
, copy the files (again), then setenforce 1
?
Is this related to the filesystems being mounted in /mnt
? I.e. special selinux protections in /mnt
, whereas there wouldn’t be the same protections in, say, ~/
?
Any help appreciated!
Example:
> du -sh /mnt/nvme
...
du: cannot read directory '/mnt/nvme/work/Company/Sleep/logs': Permission denied
du: cannot read directory '/mnt/nvme/work/Company/Sleep/refs': Permission denied
du: cannot read directory '/mnt/nvme/work/Company/Sleep/src': Permission denied
2.5T /mnt/nvme/work/Neurogram/Sleep