Coder Social home page Coder Social logo

Comments (7)

probonopd avatar probonopd commented on July 22, 2024 2

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.

jorangreef avatar jorangreef commented on July 22, 2024 1

Thanks @ravikp7

from sudo-prompt.

jorangreef avatar jorangreef commented on July 22, 2024

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.

DSBalaban avatar DSBalaban commented on July 22, 2024

@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.

jorangreef avatar jorangreef commented on July 22, 2024

Sure, sorry for the late reply.

I will close in the mean time then if that's fine with you.

from sudo-prompt.

ravikp7 avatar ravikp7 commented on July 22, 2024

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.

ravikp7 avatar ravikp7 commented on July 22, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.