mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-08-31 15:19:42 +02:00
Fix:Setting file ownership for /config and /metadata/logs #584
This commit is contained in:
parent
793cc989de
commit
d130dd6d5e
4 changed files with 43 additions and 23 deletions
|
@ -2,6 +2,7 @@ const Path = require('path')
|
|||
const njodb = require('./libs/njodb')
|
||||
const Logger = require('./Logger')
|
||||
const { version } = require('../package.json')
|
||||
const filePerms = require('./utils/filePerms')
|
||||
const LibraryItem = require('./objects/LibraryItem')
|
||||
const User = require('./objects/user/User')
|
||||
const Collection = require('./objects/Collection')
|
||||
|
@ -131,6 +132,9 @@ class Db {
|
|||
async init() {
|
||||
await this.load()
|
||||
|
||||
// Set file ownership for all files created by db
|
||||
await filePerms.setDefault(global.ConfigPath, true)
|
||||
|
||||
if (!this.serverSettings) { // Create first load server settings
|
||||
this.serverSettings = new ServerSettings()
|
||||
await this.insertEntity('settings', this.serverSettings)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue