Skip to content

Commit

Permalink
Change permissions so users in group of database can access
Browse files Browse the repository at this point in the history
If a systemd user has ownership of a database file we want regular users
to be able to use this
  • Loading branch information
darcys22 committed Jun 5, 2021
1 parent 8883dc8 commit 9620f33
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion godbledger/db/sqlite3db/sqlite3db.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func (db *Database) Close() error {
// NewDB initializes a new DB.
func NewDB(dirPath, mode string) (*Database, error) {
log.Debug("Creating DB")
if err := os.MkdirAll(dirPath, 0700); err != nil {
if err := os.MkdirAll(dirPath, 0770); err != nil {
return nil, err
}
datafile := path.Join(dirPath, fmt.Sprintf("%s?_foreign_keys=true&parseTime=true&mode=%s", ledgerDBName, mode))
Expand Down

0 comments on commit 9620f33

Please sign in to comment.