Fixed some errors

This commit is contained in:
Alexey Berezhok
2024-08-24 23:09:09 +03:00
parent e22f2e6bdb
commit 1554fe41b7
2 changed files with 10 additions and 4 deletions

View File

@@ -172,7 +172,7 @@ func setUserPhpPathVer(username string, php_ver string, php_path string) error {
}
}
path_to_php_config := path.Join(root_path, PATH_TO_CONFIG_NAME)
f, err := os.OpenFile(path_to_php_config, os.O_WRONLY, 0400)
f, err := os.OpenFile(path_to_php_config, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0400)
if err != nil {
return err
}