Add permissions function peach-config #56

Merged
notplants merged 3 commits from permissions into main 2021-12-22 17:18:24 +00:00
1 changed files with 1 additions and 1 deletions
Showing only changes of commit 570f6a679b - Show all commits

View File

@ -10,7 +10,7 @@ pub const CONFIGS_DIR: &str = "/var/lib/peachcloud";
/// so this is a useful CLI function for quickly correcting anything that may be out of order.
pub fn set_permissions() -> Result<(), PeachConfigError> {
println!("[ UPDATING FILE PERMISSIONS ON PEACHCLOUD DEVICE ]");
cmd(&["chmod", "-R", "660", CONFIGS_DIR])?;
cmd(&["chmod", "-R", "u+rwX,g+rwX", CONFIGS_DIR])?;
cmd(&["chown", "-R", "peach", CONFIGS_DIR])?;
cmd(&["chgrp", "-R", "peach", CONFIGS_DIR])?;
println!("[ PERMISSIONS SUCCESSFULLY UPDATED ]");