Skip to content

Commit ed99b74

Browse files
committed
vm(qemu): ensure created EFI vars is rw
Fixes #6725
1 parent acbf2ba commit ed99b74

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Configuration/UTMQemuConfigurationQEMU.swift

+3
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
//
1616

1717
import Foundation
18+
import System
1819

1920
/// Tweaks and advanced QEMU settings.
2021
struct UTMQemuConfigurationQEMU: Codable {
@@ -189,6 +190,8 @@ extension UTMQemuConfigurationQEMU {
189190
if !fileManager.fileExists(atPath: varsURL.path) {
190191
try await Task.detached {
191192
try FileManager.default.copyItem(at: templateVarsURL, to: varsURL)
193+
let permissions: FilePermissions = [.ownerReadWrite, .groupRead, .otherRead]
194+
try FileManager.default.setAttributes([.posixPermissions: permissions.rawValue], ofItemAtPath: varsURL.path)
192195
}.value
193196
}
194197
efiVarsURL = varsURL

0 commit comments

Comments
 (0)