fix: permissions

This commit is contained in:
Julian Sommer
2026-02-10 10:10:39 +10:00
parent e545e81e59
commit b443bbd3e2
4 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -377,7 +377,7 @@ func runimagesImportCmd(cmd *cobra.Command, args []string) {
manifestFilename := fmt.Sprintf("%s/%s.json", imagePath, manifest.AMIMetadata.Name)
// Write to file
err = os.WriteFile(manifestFilename, jsonData, 0644)
err = os.WriteFile(manifestFilename, jsonData, 0600)
if err != nil {
fmt.Fprintf(os.Stderr, "Could not write manifest: %v\n", err)
os.Exit(1)
@@ -850,7 +850,7 @@ func runAdminJoin(cmd *cobra.Command, args []string) {
caCertPath := filepath.Join(configDir, "ca.pem")
caKeyPath := filepath.Join(configDir, "ca.key")
if err := os.WriteFile(caCertPath, []byte(joinResp.CACert), 0644); err != nil {
if err := os.WriteFile(caCertPath, []byte(joinResp.CACert), 0600); err != nil {
fmt.Fprintf(os.Stderr, "Error writing CA cert: %v\n", err)
os.Exit(1)
}