Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bootstrap: make-btrfs-fs: Fix filesystem permissions
Fakeroot was not taking effect, resulting in all files being owned by UID 1000 and GID 100. Use unshare to enter a user namespace with the user mapped as root such that the files loaded into the btrfs filesystem are owned by the root user and thus fixing multiple boot issues related to permissions and security. Namely, systemd-tmpfiles refuses to operate on a number of paths and sshd refuses to accept pubkeys due to insecure permissions in path. The nix-store also would be editable by UID 1000, and maybe members of GID 100. The nix-daemon eventually cleans this up, but should never be this way.
- Loading branch information