From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id 408101FF138 for ; Tue, 21 Jul 2026 15:16:13 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id EEC3C21387; Tue, 21 Jul 2026 15:16:12 +0200 (CEST) Message-ID: Date: Tue, 21 Jul 2026 15:15:38 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH proxmox-backup v4 07/15] pbs-config: drop backup_group helper, use users gid instead To: Robert Obkircher References: <20260720141605.728096-1-c.ebner@proxmox.com> <20260720141605.728096-8-c.ebner@proxmox.com> <178463829185.236029.13487937882645902301.b4-review@b4> Content-Language: en-US, de-DE From: Christian Ebner In-Reply-To: <178463829185.236029.13487937882645902301.b4-review@b4> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1784639712925 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.187 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: 5DBG3SGZYLMUWJ53Y6LKS57DHRTR4W5E X-Message-ID-Hash: 5DBG3SGZYLMUWJ53Y6LKS57DHRTR4W5E 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 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: On 7/21/26 2:51 PM, Robert Obkircher wrote: >> 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. Yes, will align the mode for both branches. Must double check, but this could lead to potential issues when using the debug tooling as non-root/backup user. So might be better to keep the modes as is, to avoid breaking changes there. Although I agree that 0o0640 would be preferable here. > >> 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. Ack, thanks!