From: Oguz Bektas <o.bektas@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH backup] tape: create drive-state and changer-state directories with correct permissions
Date: Tue, 4 May 2021 15:10:35 +0200 [thread overview]
Message-ID: <20210504131035.1480432-1-o.bektas@proxmox.com> (raw)
we need to also pass the intermediate_opts to avoid creating
/run/proxmox-backup/ with root as owner (in case it does not exist yet)
Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
---
src/tape/mod.rs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/tape/mod.rs b/src/tape/mod.rs
index ed03d8a7..de15800f 100644
--- a/src/tape/mod.rs
+++ b/src/tape/mod.rs
@@ -85,7 +85,7 @@ pub fn create_drive_state_dir() -> Result<(), Error> {
.owner(backup_user.uid)
.group(backup_user.gid);
- create_path(DRIVE_STATE_DIR, None, Some(options))
+ create_path(DRIVE_STATE_DIR, Some(options.clone()), Some(options))
.map_err(|err: Error| format_err!("unable to create drive state dir - {}", err))?;
Ok(())
@@ -100,7 +100,7 @@ pub fn create_changer_state_dir() -> Result<(), Error> {
.owner(backup_user.uid)
.group(backup_user.gid);
- create_path(CHANGER_STATE_DIR, None, Some(options))
+ create_path(CHANGER_STATE_DIR, Some(options.clone()), Some(options))
.map_err(|err: Error| format_err!("unable to create changer state dir - {}", err))?;
Ok(())
--
2.20.1
next reply other threads:[~2021-05-04 13:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-04 13:10 Oguz Bektas [this message]
2021-05-06 6:24 Dietmar Maurer
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=20210504131035.1480432-1-o.bektas@proxmox.com \
--to=o.bektas@proxmox.com \
--cc=pbs-devel@lists.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