From 3f9b11c76f74e343672fd4c06d6724f4b9dccce9 Mon Sep 17 00:00:00 2001 From: Nulo Date: Tue, 21 Feb 2023 13:19:57 -0300 Subject: [PATCH] qemu: chown para que funcione --- qemu.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/qemu.ts b/qemu.ts index de1f268..fefae01 100644 --- a/qemu.ts +++ b/qemu.ts @@ -2,6 +2,7 @@ import { mkdtemp, rm } from "node:fs/promises"; import { tmpdir } from "node:os"; import path from "node:path"; import { execFile } from "./helpers/better-api.js"; +import { sudoChownToRunningUser } from "./helpers/sudo.js"; export async function runQemu( squashfs: string, @@ -11,6 +12,9 @@ export async function runQemu( noShutdown: false, } ) { + await sudoChownToRunningUser(kernel.initramfs); + await sudoChownToRunningUser(kernel.vmlinuz); + await sudoChownToRunningUser(squashfs); const tmp = await mkdtemp(path.join(tmpdir(), "define-alpine-qemu-")); try { const disk = path.join(tmp, "tmp.ext4");