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 81BEF1FF138 for ; Tue, 21 Jul 2026 14:51:40 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id A01B5214B7; Tue, 21 Jul 2026 14:51:39 +0200 (CEST) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Subject: Re: [PATCH proxmox-backup v4 07/15] pbs-config: drop backup_group helper, use users gid instead From: Robert Obkircher To: Christian Ebner In-Reply-To: <20260720141605.728096-8-c.ebner@proxmox.com> References: <20260720141605.728096-1-c.ebner@proxmox.com> <20260720141605.728096-8-c.ebner@proxmox.com> Date: Tue, 21 Jul 2026 14:51:31 +0200 Message-Id: <178463829185.236029.13487937882645902301.b4-review@b4> X-Mailer: b4 0.16-dev X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1784638268103 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.252 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_LOW -0.7 Sender listed at https://www.dnswl.org/, low trust 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: U3XQLZ2DWHXD33UVLH3A4JFU7PEIM7KH X-Message-ID-Hash: U3XQLZ2DWHXD33UVLH3A4JFU7PEIM7KH X-MailFrom: r.obkircher@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 CC: pbs-devel@lists.proxmox.com 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: > diff --git a/pbs-datastore/src/chunk_store.rs b/pbs-datastore/src/chunk_store.rs > index a936f5034..09a0242fc 100644 > --- a/pbs-datastore/src/chunk_store.rs > +++ b/pbs-datastore/src/chunk_store.rs > @@ -756,12 +756,11 @@ impl ChunkStore { > .parent() > .ok_or_else(|| format_err!("unable to get chunk dir"))?; > > - let mut create_options = CreateOptions::new(); > - if nix::unistd::Uid::effective().is_root() { > - let uid = pbs_config::backup_user()?.uid; > - let gid = pbs_config::backup_group()?.gid; > - create_options = create_options.owner(uid).group(gid); > - } > + let create_options = if nix::unistd::Uid::effective().is_root() { > + proxmox_product_config::default_create_options() > + } else { > + CreateOptions::new() > + }; The previous version never specified a mode in which case apply_to seems to default to 0o644. The new version specifies 0o0640. This does sound more correct to me, but I wanted to mention it becasue it does take away some permissions and the modes will now differ for the two branches. > proxmox_sys::fs::replace_file( > &chunk_path, > raw_data, > @@ -813,12 +812,11 @@ impl ChunkStore { > > /// Helper to generate new empty marker file > fn create_marker_file(path: &Path) -> Result<(), Error> { > - let mut create_options = CreateOptions::new(); > - if nix::unistd::Uid::effective().is_root() { > - let uid = pbs_config::backup_user()?.uid; > - let gid = pbs_config::backup_group()?.gid; > - create_options = create_options.owner(uid).group(gid); > - } > + let create_options = if nix::unistd::Uid::effective().is_root() { > + proxmox_product_config::default_create_options() > + } else { > + CreateOptions::new() > + }; Same issue here. -- Robert Obkircher