Create directories in publishdir with mode 0777.
authorDavid Arroyo <darroyo@constantcontact.com>
Mon, 2 Dec 2013 01:33:52 +0000 (20:33 -0500)
committerNoah Campbell <noahcampbell@gmail.com>
Tue, 3 Dec 2013 00:06:31 +0000 (16:06 -0800)
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 <noahcampbell@gmail.com>
target/file.go

index 0e48a93e522158c89faf7c123fd96489fb8a1974..f3d2b0b629f64def53f7342d0007f3aa9e026d64 100644 (file)
@@ -42,7 +42,7 @@ func writeToDisk(translated string, r io.Reader) (err error) {
        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)
                }