diff --git a/Cargo.lock b/Cargo.lock index 676f32f..6e8785f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2380,7 +2380,7 @@ dependencies = [ [[package]] name = "peach-config" -version = "0.1.19" +version = "0.1.20" dependencies = [ "clap", "env_logger 0.6.2", diff --git a/peach-config/Cargo.toml b/peach-config/Cargo.toml index 023bc42..225524d 100644 --- a/peach-config/Cargo.toml +++ b/peach-config/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "peach-config" -version = "0.1.19" +version = "0.1.20" authors = ["Andrew Reid ", "Max Fowler "] edition = "2018" description = "Command line tool for installing, updating and configuring PeachCloud" diff --git a/peach-config/src/set_permissions.rs b/peach-config/src/set_permissions.rs index 20d79ab..45a6959 100644 --- a/peach-config/src/set_permissions.rs +++ b/peach-config/src/set_permissions.rs @@ -5,6 +5,7 @@ use crate::utils::cmd; /// so they can be read and written by all PeachCloud services. pub const CONFIGS_DIR: &str = "/var/lib/peachcloud"; pub const PEACH_WEB_DIR: &str = "/usr/share/peach-web"; +pub const PEACH_HOME_DIR: &str = "/home/peach"; /// Utility function to set correct file permissions on the PeachCloud device. /// Accidentally changing file permissions is a fairly common thing to happen, @@ -15,7 +16,8 @@ pub fn set_permissions() -> Result<(), PeachConfigError> { cmd(&["chown", "-R", "peach", CONFIGS_DIR])?; cmd(&["chgrp", "-R", "peach", CONFIGS_DIR])?; cmd(&["chmod", "-R", "u+rwX,g+rwX", PEACH_WEB_DIR])?; - cmd(&["chown", "-R", "peach-web:peach", PEACH_WEB_DIR])?; + cmd(&["chown", "-R", "peach:peach", PEACH_WEB_DIR])?; + cmd(&["chown", "-R", "peach:peach", PEACH_HOME_DIR])?; println!("[ PERMISSIONS SUCCESSFULLY UPDATED ]"); Ok(()) }