Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't run generated app due to wrong permission in Linux builds ("locales" and "resources" directories) #786

Closed
blueoctopus opened this issue Sep 28, 2016 · 5 comments · May be fixed by qcif/data-curator#563
Assignees

Comments

@blueoctopus
Copy link

  • Version: 7.10.0
  • Target: Ubuntu .deb package

The permissions are correctly set when using electron-builder v7.3.0. When building with v7.10.0, the installed app can't run after it's installed due to these wrong permissions:

drwx------ 2 root root 4.0K Sep 27 23:07 locales
drwx------ 3 root root 4.0K Sep 27 23:07 resources

I've also found this issue is present in the linux-unpacked directory that is generated during a build, so it doesn't seem related to generating deb or rpm packages.

@hovancik
Copy link

I believe I have the similar problem:

after building my app for linux (.deb), I can not run app as normal user:

module.js:457
    throw err;
    ^

Error: Cannot find module '/opt/stretchly/resources/electron.asar/browser/init.js'
    at Function.Module._resolveFilename (module.js:455:15)
    at Function.Module._load (module.js:403:25)
    at Module.runMain (module.js:590:10)
    at run (bootstrap_node.js:402:7)
    at startup (bootstrap_node.js:157:9)
    at bootstrap_node.js:521:3

I am able to run app as root (with sudo) properly.

source code for my app is here: https://github.com/hovancik/stretchly

@makeitcount
Copy link

makeitcount commented Oct 1, 2016

Me too. Same issue.
electron-builder@7.9.0
App is not starting up after installing through deb file. Deb was created using build --linux deb. AppImage works fine.

Tried to debug using electron-inspector and got this error

Error: Cannot find module '/opt/MyElectron App/resources/electron.asar/browser/init.js'
    at Function.Module._resolveFilename (module.js:455:15)
    at Function.Module._load (module.js:403:25)
    at Module.runMain (module.js:590:10)
    at run (bootstrap_node.js:402:7)
    at startup (bootstrap_node.js:157:9)
    at bootstrap_node.js:521:3

But my permissions are right.
-rw-r--r-- 1 root root 195570 Sep 30 02:54 electron.asar

@develar
Copy link
Member

develar commented Oct 2, 2016

Confirmed, will be fixed ASAP, sorry for delay.

@KochiyaOcean
Copy link

KochiyaOcean commented Nov 4, 2016

ExtraResources seems still have wrong permission. Electron-builder v7.11.4, deb build.
image

@develar
Copy link
Member

develar commented Nov 27, 2016

@KochiyaOcean Extra directories permissions is fixed — 755 regardless of original source directory mode. Extra files permissions is fixed as well — read for all is added if missed in the original source file mode. 10.1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants