opt flink creation

Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
21pages committed 2023-01-31 09:47:50 +08:00
1 parent 61389bc11f
commit fb81f206b7
2 files changed
+38 -40

No files matched your search

+10
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(())
}