From: Fiona Ebner <f.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH qemu-server 1/3] d/tmpfiles: add configuration to auto-create /run/qemu-server directory
Date: Mon, 4 May 2026 15:03:46 +0200 [thread overview]
Message-ID: <20260504130751.226845-2-f.ebner@proxmox.com> (raw)
In-Reply-To: <20260504130751.226845-1-f.ebner@proxmox.com>
Some code paths use /run/qemu-server, some code paths use
/var/run/qemu-server. Nothing currently ensures that the former
directory exists, but usually, /var/run is a symlink to /run, so it
does work in practice. The latter directory is created in the
Helpers.pm module. Usage of these paths should be aligned for the next
major release.
If /var/run is a symlink to /run like usual, then this change makes
the permissions tighter, because the directory /var/run/qemu-server
was created with 0755 permissions by the Helpers.pm module and is now
created via the tmpfiles configuration. The permissions chosen are
0750 with user root and group www-data. This is in line with what
/run/pve-cluster and /run/pve have.
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
debian/tmpfiles | 2 ++
src/PVE/QemuServer/Helpers.pm | 2 ++
2 files changed, 4 insertions(+)
create mode 100644 debian/tmpfiles
diff --git a/debian/tmpfiles b/debian/tmpfiles
new file mode 100644
index 00000000..3bbe100c
--- /dev/null
+++ b/debian/tmpfiles
@@ -0,0 +1,2 @@
+#Type Path Mode User Group Age Argument
+d /run/qemu-server 0750 root www-data - -
diff --git a/src/PVE/QemuServer/Helpers.pm b/src/PVE/QemuServer/Helpers.pm
index 65f4ce5f..dd17eef5 100644
--- a/src/PVE/QemuServer/Helpers.pm
+++ b/src/PVE/QemuServer/Helpers.pm
@@ -81,6 +81,8 @@ sub kvm_user_version {
# Paths and directories
+# FIXME: MAJOR VERSION: use /run/qemu-server everywhere instead of mixing /run and /var/run and rely
+# on debian/tmpfiles config to create the directory.
our $var_run_tmpdir = "/var/run/qemu-server";
mkdir $var_run_tmpdir;
--
2.47.3
next prev parent reply other threads:[~2026-05-04 13:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-04 13:03 [PATCH-SERIES qemu-server 0/3] ovmf: create temporary EFI disk below /run instead of /tmp to avoid migration issue Fiona Ebner
2026-05-04 13:03 ` Fiona Ebner [this message]
2026-05-04 13:03 ` [PATCH qemu-server 2/3] ovmf: use file module directly for file_copy() Fiona Ebner
2026-05-04 13:03 ` [PATCH qemu-server 3/3] ovmf: create temporary EFI disk below /run instead of /tmp to avoid migration issue Fiona Ebner
2026-05-06 0:20 ` applied: [PATCH-SERIES qemu-server 0/3] " Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260504130751.226845-2-f.ebner@proxmox.com \
--to=f.ebner@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.