From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [IPv6:2a0f:8001:1:32::40]) by lore.proxmox.com (Postfix) with ESMTPS id 3AB3E1FF0E7 for ; Thu, 13 Aug 2026 19:10:58 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id C6FF221AD9; Thu, 13 Aug 2026 19:10:36 +0200 (CEST) From: Christian Ebner To: pbs-devel@lists.proxmox.com Subject: [PATCH proxmox-backup 11/28] api: backup: allow backup for user/token with append permission Date: Thu, 13 Aug 2026 19:09:45 +0200 Message-ID: <20260813171002.809441-12-c.ebner@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260813171002.809441-1-c.ebner@proxmox.com> References: <20260813171002.809441-1-c.ebner@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1786641015211 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.212 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust RDNS_NONE 1.274 Delivered to internal network by a host with no rDNS SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: JHJWEBQ7WORFQLNVCSESV3XFGWXHQAOD X-Message-ID-Hash: JHJWEBQ7WORFQLNVCSESV3XFGWXHQAOD X-MailFrom: c.ebner@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox Backup Server development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: In addition to these with PRIV_DATASTORE_BACKUP, also users/tokens with PRIV_DATASTORE_APPEND should be able to create new backup groups and snapshots. Since only one of them is required to be set, change the priv check to be partial only. Signed-off-by: Christian Ebner --- src/api2/backup/mod.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/api2/backup/mod.rs b/src/api2/backup/mod.rs index fe01636d6..cb54d397c 100644 --- a/src/api2/backup/mod.rs +++ b/src/api2/backup/mod.rs @@ -23,7 +23,8 @@ use proxmox_sortable_macro::sortable; use pbs_api_types::{ ArchiveType, Authid, BACKUP_ARCHIVE_NAME_SCHEMA, BACKUP_ID_SCHEMA, BACKUP_NAMESPACE_SCHEMA, BACKUP_TIME_SCHEMA, BACKUP_TYPE_SCHEMA, BackupArchiveName, BackupNamespace, BackupType, - CHUNK_DIGEST_SCHEMA, DATASTORE_SCHEMA, Operation, PRIV_DATASTORE_BACKUP, VerifyState, + CHUNK_DIGEST_SCHEMA, DATASTORE_SCHEMA, Operation, PRIV_DATASTORE_APPEND, PRIV_DATASTORE_BACKUP, + VerifyState, }; use pbs_config::CachedUserInfo; use pbs_datastore::index::IndexFile; @@ -94,8 +95,8 @@ fn upgrade_to_backup_protocol( .check_privs( &auth_id, &backup_ns.acl_path(&store), - PRIV_DATASTORE_BACKUP, - false, + PRIV_DATASTORE_APPEND | PRIV_DATASTORE_BACKUP, + true, ) .map_err(|err| http_err!(FORBIDDEN, "{err}"))?; -- 2.47.3