diff --git a/backend/src/setup.rs b/backend/src/setup.rs index 8504952c8..558fb901e 100644 --- a/backend/src/setup.rs +++ b/backend/src/setup.rs @@ -467,6 +467,7 @@ async fn migrate( force: true, ignore_existing: false, exclude: Vec::new(), + no_permissions: false, }, ) .await?; @@ -478,6 +479,7 @@ async fn migrate( force: true, ignore_existing: false, exclude: vec!["tmp".to_owned()], + no_permissions: false, }, ) .await?; diff --git a/backend/src/update/mod.rs b/backend/src/update/mod.rs index fe8e8bb4b..dc7146a25 100644 --- a/backend/src/update/mod.rs +++ b/backend/src/update/mod.rs @@ -305,6 +305,7 @@ async fn sync_boot() -> Result<(), Error> { force: false, ignore_existing: true, exclude: Vec::new(), + no_permissions: false, }, ) .await? diff --git a/libs/helpers/src/rsync.rs b/libs/helpers/src/rsync.rs index e317416ff..314f1283b 100644 --- a/libs/helpers/src/rsync.rs +++ b/libs/helpers/src/rsync.rs @@ -21,6 +21,8 @@ pub struct RsyncOptions { pub ignore_existing: bool, #[serde(default)] pub exclude: Vec, + #[serde(default = "const_true")] + pub no_permissions: bool, } impl Default for RsyncOptions { fn default() -> Self { @@ -29,6 +31,7 @@ impl Default for RsyncOptions { force: true, ignore_existing: false, exclude: Vec::new(), + no_permissions: false, } } } @@ -55,6 +58,9 @@ impl Rsync { if options.ignore_existing { cmd.arg("--ignore-existing"); } + if options.no_permissions { + cmd.arg("--no-perms"); + } for exclude in options.exclude { cmd.arg(format!("--exclude={}", exclude)); }