public inbox for pmg-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: Stoiko Ivanov <s.ivanov@proxmox.com>, pmg-devel@lists.proxmox.com
Subject: [pmg-devel] applied: [PATCH pmg-api v2] utils: postgres_admin_cmd chdir to / before running
Date: Thu, 3 Feb 2022 12:35:13 +0100	[thread overview]
Message-ID: <34f54a08-6595-846c-623a-5806dd4f837c@proxmox.com> (raw)
In-Reply-To: <20211201180826.68298-1-s.ivanov@proxmox.com>

On 01.12.21 19:08, Stoiko Ivanov wrote:
> postgres_admin_cmd switches user to the postgres user.
> 
> When running a cli command in `/root` (or any other directory not
> accessible by the postgres user) this causes:
> 
> `could not change directory to "/root": Permission denied`
> 
> to be printed multiple times on stderr for those invocations, which is
> confusing and has caused quite a few support requests.
> 
> modifying the postgres_admin_cmd invocation only should not cause any
> future surprises
> 
> quickly tested with `pmgconfig sync`
> 
> Reported-by: Oguz Bektas <o.bektas@proxmox.com>
> Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
> ---
> v1->v2:
> * changed to only cd'ing for the problematic postgres_admin_cmd, after
>   a chat with Thomas - huge thanks!
> 
>  src/PMG/Utils.pm | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
>

applied, thanks! Added $! to the error messages in a followup so that the
user/we gets more context wrt. the error.




      reply	other threads:[~2022-02-03 11:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-01 18:08 [pmg-devel] " Stoiko Ivanov
2022-02-03 11:35 ` Thomas Lamprecht [this message]

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=34f54a08-6595-846c-623a-5806dd4f837c@proxmox.com \
    --to=t.lamprecht@proxmox.com \
    --cc=pmg-devel@lists.proxmox.com \
    --cc=s.ivanov@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