shithub: hugo

Download patch

ref: 10c7cf29424b6c230ae9df14de41656e97ea85c8
parent: ba5dadff79be78517d6d6e0e7110bcea36620d20
author: David Arroyo <[email protected]>
date: Sun Dec 1 15:33:52 EST 2013

Create directories in publishdir with mode 0777.

The previous permissions (0764), were unusable (directories must
be executable) when generating files for use by another uid. The
Right Thing™ is to use mode 0777. The OS will subtract the process
umask (usually 022) to the for the final permissions.

Signed-off-by: Noah Campbell <[email protected]>

--- a/target/file.go
+++ b/target/file.go
@@ -42,7 +42,7 @@
 	ospath := filepath.FromSlash(path)
 
 	if ospath != "" {
-		err = os.MkdirAll(ospath, 0764) // rwx, rw, r
+		err = os.MkdirAll(ospath, 0777) // rwx, rw, r
 		if err != nil {
 			panic(err)
 		}