opt flink creation

Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
21pages
2023-01-29 17:36:37 +08:00
parent 61389bc11f
commit fb81f206b7
2 changed files with 38 additions and 40 deletions

View File

@@ -1745,3 +1745,13 @@ pub fn create_process_with_logon(user: &str, pwd: &str, exe: &str, arg: &str) ->
}
return Ok(());
}
pub fn set_path_permission(dir: &PathBuf, permission: &str) -> ResultType<()> {
std::process::Command::new("icacls")
.arg(dir.as_os_str())
.arg("/grant")
.arg(format!("Everyone:(OI)(CI){}", permission))
.arg("/T")
.spawn()?;
Ok(())
}