oscartbeaumont / ElectronPlayer

An Electron Based Web Video Services Player. Supporting Netflix, Youtube, Twitch, Floatplane, Hulu And More

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Make the app more friendly if the config is readonly and owed by a different user

antonywu opened this issue · comments

Need a way to parental control and lock things down by setting the config to 444 with user being root. The goal is to remove services that parents don't want children to access easily.

$ls -lat config.json 
-r--r--r-- 1 root root 483 May 30 15:32 config.json

$electronplayer
A JavaScript error occurred in the main process
Uncaught Exception:
Error: EACCES: permission denied, open '/home/antony/snap/electronplayer/9/.config/electronplayer/config.json'
    at Object.openSync (fs.js:453:3)
    at Object.func [as openSync] (electron/js2c/asar.js:155:31)
    at Object.readFileSync (fs.js:353:35)
    at Object.fs.readFileSync (electron/js2c/asar.js:597:40)
    at ElectronStore.get store [as store] (/snap/electronplayer/9/resources/app.asar/node_modules/conf/index.js:228:18)
    at new Conf (/snap/electronplayer/9/resources/app.asar/node_modules/conf/index.js:92:26)
    at new ElectronStore (/snap/electronplayer/9/resources/app.asar/node_modules/electron-store/index.js:23:3)
    at Object.<anonymous> (/snap/electronplayer/9/resources/app.asar/src/main.js:16:15)
    at Module._compile (internal/modules/cjs/loader.js:808:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:820:10)

I am currently really busy but when I finished developing v3.0.0 which is a complete rewrite (including a new config system) I will do some testing to fix this.
In the meantime you could try using the Appimage instead in case the snap isolation is what is causing the permission errors but this is just a guess.

@antonywu I just wanted to say I saw your fork and I will take those changes into consideration in the next update to achieve the functionality you would like.