public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Gabriel Goller <g.goller@proxmox.com>
To: Wolfgang Bumiller <w.bumiller@proxmox.com>
Cc: pbs-devel@lists.proxmox.com
Subject: Re: [pbs-devel] [PATCH proxmox-backup] chunk_store: fix problem with permission checking
Date: Thu, 14 Nov 2024 10:45:44 +0100	[thread overview]
Message-ID: <44i2jo6d7ybd7imoeaavcu2wdk2mibajvflulr5ugzmzjomwdy@a2kczrvq6sub> (raw)
In-Reply-To: <jq4zxkc52urpnfoyqqfubmxds4zobpg3i4varosos2tu2vo3iv@b4fee6om2mmi>

On 13.11.2024 15:42, Wolfgang Bumiller wrote:
>On Wed, Nov 13, 2024 at 03:20:54PM GMT, Gabriel Goller wrote:
>> On 13.11.2024 13:40, Hannes Laimer wrote:
>> > Permissions are stored in the lower 9 bits (rwxrwxrwx),
>> > so we have to mask `st_mode` with 0o777.
>> > The datastore root dir is created with 755, the `.chunks` dir and its
>> > contents with 750 and the `.lock` file with 644, this changes the
>> > expected permissions accordingly.
>>
>> Oops, this is my bad, I missed this.
>>
>> Matching the whole st_mode exactly would be nice, but not so practical
>> as we would need to be generic over file/dir and symbolic link.
>>
>> Also CC'ing @Wolfgang as he persuaded me to match exactly in the first
>> place :)
>
>Ah yes, would have had to include the mode bits...
>
>But it seems the actual permissions were wrong as well?

Yep :)

>(Not sure if I mentioned this, but I'm not convinced we should *fail* on
>unexpected permissions, I mean, we're already changing the values in the
>check now 🤷)

Hmm I think we should fail on permissions that are too low :)
But anyway, I think it's better to be strict here – we don't want a user
to import a datastore and then something failing. (and also the user can
always change the permissions.)



_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel

  reply	other threads:[~2024-11-14  9:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-13 12:40 Hannes Laimer
2024-11-13 14:20 ` Gabriel Goller
2024-11-13 14:42   ` Wolfgang Bumiller
2024-11-14  9:45     ` Gabriel Goller [this message]
2024-11-22  8:01 ` [pbs-devel] applied-series: " Fabian Grünbichler

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=44i2jo6d7ybd7imoeaavcu2wdk2mibajvflulr5ugzmzjomwdy@a2kczrvq6sub \
    --to=g.goller@proxmox.com \
    --cc=pbs-devel@lists.proxmox.com \
    --cc=w.bumiller@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
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal