Comments (7)
I found the cause of this issue. AppImages are mounted using FUSE, which only allows execution permissions on the mounted image to the user that actually executed the image. So, su can't execute with it.
Check what the Etcher AppImage, which requires root, is doing. It's described at AppImage/AppImageKit#268 (comment)
from sudo-prompt.
Thanks @ravikp7
from sudo-prompt.
Thanks @DSBalaban would you be able to add a console.log(error)
statement to the source in index.js
over here: https://github.com/jorangreef/sudo-prompt/blob/master/index.js#L130 and let me know what you get?
And also the output of stdout
and stderr
which sudo-prompt
returns to your callback.
from sudo-prompt.
@jorangreef Thanks for replying.
I'll see if I can reproduce the error, as I'm no longer seeing it (magic, I tell you). Give me a bit of time.
EDIT: Seems that I can't get it to crash and burn again, but I am on macOS Sierra right now. I'll reopen if the problem pops up again, and give you the logs.
from sudo-prompt.
Sure, sorry for the late reply.
I will close in the mean time then if that's fine with you.
from sudo-prompt.
Hi @jorangreef I think I've got a similar issue. I'm also running a script from electron environment using sudo-prompt.exec
from the app which is run without sudo permissions.
Everything works fine, no errors during development. The app works fine on mac with dmg built by electron-builder. Also no error with unpacked linux build from electron-builder.
I'm only having issues with AppImage (again built by electron-builder) on linux. Sudo-prompt throws this error after entering the password
Error: Command failed: "/usr/bin/pkexec" --disable-internal-agent env ELECTRON_RUN_AS_NODE=1 IPC_SERVER_ID=BB-server-17137 IPC_CLIENT_ID=BB-client-17137 /tmp/.mount_ASpV7H/usr/bin/beagleboot /tmp/.mount_ASpV7H/usr/bin/resources/app.asar/lib/elevate.js /usr/bin/env: ‘/tmp/.mount_ASpV7H/usr/bin/beagleboot’: Permission denied
Seems that the executable isn't accessible. Any suggestions, where it's going wrong?
from sudo-prompt.
I found the cause of this issue. AppImages are mounted using FUSE, which only allows execution permissions on the mounted image to the user that actually executed the image. So, su can't execute with it. I'd have to remount the AppImage as root to get it working.
from sudo-prompt.
Related Issues (20)
- 'Command failed' in Electron app HOT 1
- Not possible in Mac App Store, aka app-sandbox HOT 5
- macOS Catalina Operation not permitted HOT 1
- OS dialog prompt is not being prompted in Windows 10 HOT 1
- Operation not permitted in macOS with sudo-prompt
- Prompt shows but name and icon are not visible on macOS HOT 8
- "User did not grant permissions" if I click "Yes" too quickly on Windows? HOT 1
- `sudo-prompt` fails to detect `pkexec` or `kdesudo` in "strictly" confined snap
- Special characters handling on Linux
- Strange behaviour with Electron 9 on Win10 HOT 1
- in Eelectron app Rendering process, sudo run cp not work
- Hello, why option.name just support [a-z0-9 ] ?
- How to get elevated shell and run a command without sudo prefix HOT 1
- macOS: Application cannot be opened because the developer cannot be verified
- BigSur 11.1 issue: The authorization was denied since no user interaction was possible HOT 1
- Linux: option.env not used
- Unexpected behaviour with linux - electron.js HOT 1
- electron exe with root system privileges in linux, It's possible to do ?
- How to run multiple commands without requiring password every time HOT 6
- Any pkg similar to this, but without root/admin?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sudo-prompt.