frontend: don't give too much right on created files
This commit is contained in:
parent
b31f009d2e
commit
fb1d8f90ed
@ -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)
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user