diff --git a/Changelog.md b/Changelog.md
index 60a5a05..87ac649 100644
--- a/Changelog.md
+++ b/Changelog.md
@@ -11,7 +11,7 @@
✓ Encrypt previously unencrypted temporary zip files
✓ Add `.incomplete` to filenames while work is in progress
✓ Use `encrypted-*.zip.pcv` output name instead of `Encrypted.zip.pcv`
- ✓ Use 0600 permissions when auto unzipping for optimal security
+ ✓ Use 0700 permissions when auto unzipping and creating folders
# v1.47 (Released 02/19/2025)
diff --git a/src/Picocrypt.go b/src/Picocrypt.go
index 339be2b..dcd25fe 100644
--- a/src/Picocrypt.go
+++ b/src/Picocrypt.go
@@ -2486,7 +2486,7 @@ func unpackArchive(zipPath string) error {
// Make directory if current entry is a folder
if f.FileInfo().IsDir() {
- if err := os.MkdirAll(outPath, f.Mode()); err != nil {
+ if err := os.MkdirAll(outPath, 0700); err != nil {
return err
}
}
@@ -2505,7 +2505,7 @@ func unpackArchive(zipPath string) error {
outPath := filepath.Join(extractDir, f.Name)
// Otherwise create necessary parent directories
- if err := os.MkdirAll(filepath.Dir(outPath), 0600); err != nil {
+ if err := os.MkdirAll(filepath.Dir(outPath), 0700); err != nil {
return err
}