[pbs-devel] [PATCH backup] tape: create drive-state and changer-state directories with correct permissions
Oguz Bektas
o.bektas at proxmox.com
Tue May 4 15:10:35 CEST 2021
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 at 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
More information about the pbs-devel
mailing list