Merge pull request #23 from netbenix/SCABIOSA-15
Fixed file permissions
This commit is contained in:
commit
f30e9af1f4
2 changed files with 4 additions and 4 deletions
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
Please keep in mind that this project is WIP.
|
||||
|
||||
Trello board: [Click me!](https://trello.com/b/6zWLE6Jm)
|
||||
YouTrack Issues & Agile Board: [Click me!](https://codenoodles.youtrack.cloud/issues)
|
||||
|
||||
## What can it do?
|
||||
- Backup you stuff via a dynamic configuration
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ func CheckIfConfigExists() {
|
|||
logger := Logging.DetailedLogger("ConfigHandler", "CheckIfConfigExists")
|
||||
|
||||
if _, err := os.Stat("config/config.json"); os.IsNotExist(err) {
|
||||
_, fileErr := os.OpenFile("config/config.json", os.O_CREATE, 0775)
|
||||
_, fileErr := os.OpenFile("config/config.json", os.O_CREATE, 0600)
|
||||
if fileErr != nil {
|
||||
logger.Fatal(fileErr)
|
||||
}
|
||||
|
|
@ -78,7 +78,7 @@ func GenerateBaseConfig() {
|
|||
for _, s := range baseConfig.FolderToBackup {
|
||||
s.BackupName = ""
|
||||
}
|
||||
err = os.WriteFile("config/config.json", conf, 0775)
|
||||
err = os.WriteFile("config/config.json", conf, 0600)
|
||||
if err != nil {
|
||||
logger.Fatal(err)
|
||||
}
|
||||
|
|
@ -107,7 +107,7 @@ func GenerateSQLConfig(sqlConfig SQLConfig) {
|
|||
logger.Fatal(err)
|
||||
}
|
||||
|
||||
err = os.WriteFile("config/sql-config.json", conf, 0775)
|
||||
err = os.WriteFile("config/sql-config.json", conf, 0600)
|
||||
if err != nil {
|
||||
logger.Fatal(err)
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue