Establish stricter sqlite file permissions (#21947)
This commit is contained in:
parent
1333a07664
commit
4d10dcf562
1 changed files with 1 additions and 1 deletions
|
|
@ -25,7 +25,7 @@ func New(driver, dsn string) (*gorm.DB, error) {
|
|||
return nil, err
|
||||
}
|
||||
log.INFO.Println("using sqlite database:", file)
|
||||
if err := os.MkdirAll(filepath.Dir(file), os.ModePerm); err != nil {
|
||||
if err := os.MkdirAll(filepath.Dir(file), 0700); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
// avoid busy errors
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue