From: "肖 宇良" <xyl1509410143@outlook.com>
To: "pve-devel@lists.proxmox.com" <pve-devel@lists.proxmox.com>
Subject: [QUESTION] pve-storage: intended Datastore.Audit visibility of prunebackups metadata
Date: Mon, 2 Nov 2026 03:14:44 +0000 [thread overview]
Message-ID: <ME5PR01MB1090955C9DB2349DE0AD2AE11BF6A2@ME5PR01MB10909.ausprd01.prod.outlook.com> (raw)
Hello,
I would like to clarify the intended permission semantics of the prunebackups dry-run API.
Tested environment:
*
Proxmox VE 9.2.21
*
Proxmox Backup Server storage 4.2.8-1
*
User B with PVEVMUser on its own pool and PVEDatastoreUser on the storage; no permission on VM 124, which belongs to another pool
Observed behavior:
1.
As B, GET /nodes/<node>/storage/<storage>/prunebackups?prune-backups=keep-last%3D1 returns backups of all five guests on the storage, including VM 124, with volid, vmid, ctime and the keep/remove mark.
2.
Adding &type=qemu&vmid=124 also returns both backups of VM 124.
3.
GET /nodes/<node>/storage/<storage>/content?content=backup&vmid=124 returns no entries for the same user. The same content request without vmid also returns no entries.
4.
GET /nodes/<node>/storage/<storage>/content/<volid> returns:
*
Permission check failed (/vms/124, VM.Backup)
5.
As the owner of VM 124, the content listing returns both backups.
The prunebackups API explicitly permits Datastore.Audit or Datastore.AllocateSpace and does not apply check_volume_access() to its result. The content API currently does apply that per-volume check.
The original prunebackups API discussion introduced the Datastore.Audit/Datastore.AllocateSpace permission check together with the volid, ctime, mark and vmid response fields:
https://lore.proxmox.com/pve-devel/ae57fdf5-c43a-f828-0d47-8e7aceb5ea62@proxmox.com/T/
In January 2023 it was explained that Datastore.Audit alone only permits knowing about the storage, and that listing backup archives additionally requires the per-volume check: Datastore.AllocateSpace on the storage plus VM.Backup on the owning guest:
https://lore.proxmox.com/pve-devel/1672907478.qzv3ze8grn.astroid@yuna.none/T/
A July 2025 patch for bug #5492 proposed letting Datastore.Audit users list a restricted set of backup metadata for monitoring. The thread was still discussing which fields to retain, and the content API still applies check_volume_access() in Proxmox VE 9.2.21:
https://lore.proxmox.com/pve-devel/1753881023.tvgbrwck0i.astroid@yuna.none/T/
Could you clarify whether the current prunebackups behavior is intentional?
*
If yes, would it make sense to document that Datastore.Audit includes visibility of backup IDs and timestamps through the prune preview?
*
If not, should the dry-run result apply the same per-volume filtering as the content API?
This is a permission-model and API-consistency question. The behavior was observed only with disposable users and backups in a private lab.
Regards,
Yuliang Xiao
next reply other threads:[~2026-11-03 12:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-02 3:14 肖 宇良 [this message]
2026-11-03 15:17 ` [QUESTION] pve-storage: intended Datastore.Audit visibility of prunebackups metadata Fiona Ebner
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=ME5PR01MB1090955C9DB2349DE0AD2AE11BF6A2@ME5PR01MB10909.ausprd01.prod.outlook.com \
--to=xyl1509410143@outlook.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.