1
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-11-04 08:17:24 -05:00

Fix #3361: Dumps are created world readable (#3473)

* Set dump file permission to 0600

* Typo
This commit is contained in:
Thibault Meyer 2016-08-17 20:38:42 +02:00 committed by 无闻
parent a00c932bbc
commit 2c5411b00c

View File

@ -96,6 +96,10 @@ func runDump(ctx *cli.Context) error {
log.Fatalf("Fail to save %s: %v", fileName, err)
}
if err := os.Chmod(fileName, 0600); err != nil {
log.Printf("Can't change file access permissions mask to 0600: %v", err)
}
log.Printf("Removing tmp work dir: %s", TmpWorkDir)
os.RemoveAll(TmpWorkDir)
log.Printf("Finish dumping in file %s", fileName)