Skip to content

Commit

Permalink
helpers: Fix permissions when creating new folders
Browse files Browse the repository at this point in the history
This was mistakingly changed from 07777 (rwx, rw, r before umask) to 0755 in Hugo 0.37. This commit reverts to the old value.

Fixes #5128
  • Loading branch information
bep committed Aug 28, 2018
1 parent ebb56e8 commit f4675fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion helpers/path.go
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@ func OpenFileForWriting(fs afero.Fs, filename string) (afero.File, error) {
if !os.IsNotExist(err) {
return nil, err
}
if err = fs.MkdirAll(filepath.Dir(filename), 0755); err != nil {
if err = fs.MkdirAll(filepath.Dir(filename), 0777); err != nil { // rwx, rw, r before umask
return nil, err
}
f, err = fs.Create(filename)
Expand Down

0 comments on commit f4675fa

Please sign in to comment.