From: Christian Ebner <c.ebner@proxmox.com>
To: Robert Obkircher <r.obkircher@proxmox.com>
Cc: pbs-devel@lists.proxmox.com
Subject: Re: [PATCH proxmox-backup v4 07/15] pbs-config: drop backup_group helper, use users gid instead
Date: Tue, 21 Jul 2026 15:15:38 +0200 [thread overview]
Message-ID: <dacc8d73-20f1-48db-bceb-b610495a7322@proxmox.com> (raw)
In-Reply-To: <178463829185.236029.13487937882645902301.b4-review@b4>
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!
next prev parent reply other threads:[~2026-07-21 13:16 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-20 14:15 [PATCH proxmox-backup v4 00/15] fix 7642: avoid expensive uid/gid lookups for lock- and config-files Christian Ebner
2026-07-20 14:15 ` [PATCH proxmox-backup v4 01/15] bin: api/proxy: early init proxmox-product-config Christian Ebner
2026-07-21 12:51 ` Robert Obkircher
2026-07-21 13:09 ` Christian Ebner
2026-07-20 14:15 ` [PATCH proxmox-backup v4 02/15] bin: daily update: refactor to use proxmox-product-config Christian Ebner
2026-07-20 14:15 ` [PATCH proxmox-backup v4 03/15] pbs-config: use proxmox-product-config::replace_secret_config() Christian Ebner
2026-07-20 14:15 ` [PATCH proxmox-backup v4 04/15] pbs-config: use proxmox-product-config::replace_privileged_config() Christian Ebner
2026-07-20 14:15 ` [PATCH proxmox-backup v4 05/15] fix #7642: avoid expensive user lookups on file locking Christian Ebner
2026-07-20 14:15 ` [PATCH proxmox-backup v4 06/15] pbs-config: use proxmox-product-config helpers Christian Ebner
2026-07-20 14:15 ` [PATCH proxmox-backup v4 07/15] pbs-config: drop backup_group helper, use users gid instead Christian Ebner
2026-07-21 12:51 ` Robert Obkircher
2026-07-21 13:15 ` Christian Ebner [this message]
2026-07-20 14:15 ` [PATCH proxmox-backup v4 08/15] pbs-datastore: use proxmox-product-config cached backup user Christian Ebner
2026-07-20 14:15 ` [PATCH proxmox-backup v4 09/15] pbs-datastore: use general helpers for file lock create options Christian Ebner
2026-07-20 14:16 ` [PATCH proxmox-backup v4 10/15] server: auth helpers: use proxmox-product-config create options helpers Christian Ebner
2026-07-20 14:16 ` [PATCH proxmox-backup v4 11/15] api: subscription: use proxmox-product-config create options Christian Ebner
2026-07-20 14:16 ` [PATCH proxmox-backup v4 12/15] tape: use proxmox-product-config helper for user lookup Christian Ebner
2026-07-20 14:16 ` [PATCH proxmox-backup v4 13/15] tape: use proxmox-product-config lock file create options Christian Ebner
2026-07-20 14:16 ` [PATCH proxmox-backup v4 14/15] tape: use proxmox-product-config to generate " Christian Ebner
2026-07-20 14:16 ` [PATCH proxmox-backup v4 15/15] tree-wide: use proxmox-product-config::get_api_user for user lookup Christian Ebner
2026-07-21 12:51 ` [PATCH proxmox-backup v4 00/15] fix 7642: avoid expensive uid/gid lookups for lock- and config-files Robert Obkircher
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=dacc8d73-20f1-48db-bceb-b610495a7322@proxmox.com \
--to=c.ebner@proxmox.com \
--cc=pbs-devel@lists.proxmox.com \
--cc=r.obkircher@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox