frontend: don't give too much right on created files

This commit is contained in:
nemunaire 2017-11-22 00:14:28 +01:00 committed by Pierre-Olivier Mercier
parent b31f009d2e
commit fb1d8f90ed
2 changed files with 2 additions and 2 deletions

View File

@ -75,7 +75,7 @@ func main() {
log.Println("Creating submission directory...")
if _, err := os.Stat(TmpSubmissionDir); os.IsNotExist(err) {
if err := os.MkdirAll(TmpSubmissionDir, 0777); err != nil {
if err := os.MkdirAll(TmpSubmissionDir, 0700); err != nil {
log.Fatal("Unable to create submission directory: ", err)
}
}

View File

@ -38,7 +38,7 @@ func saveTeamFile(dirname string, team string, filename string, w http.ResponseW
func saveFile(dirname string, filename string, r *http.Request) error {
if _, err := os.Stat(dirname); os.IsNotExist(err) {
if err := os.MkdirAll(dirname, 0777); err != nil {
if err := os.MkdirAll(dirname, 0755); err != nil {
return err
}
}