AppImageKit icon indicating copy to clipboard operation
AppImageKit copied to clipboard

sudo command not found

Open sunknudsen opened this issue 3 years ago • 8 comments

I created a VeraCrypt AppImage using appimagetool-x86_64.AppImage following a guide found on VeraCrypt's GitHub repo.

Everything works as expected but I run into an issue whey trying to mount encrypted volumes on Tails (likely this is not an AppImage issue, but just in case, reaching out here).

Failed to obtain administrative privileges: sudo /tmp/.mount_Ver********/usr/bin/veracrypt: command not found

Would someone happen to know why sudo is not found? Is there anything that can be done at the AppImage creation level?

$ which sudo
/usr/bin/sudo

sunknudsen avatar Mar 19 '21 14:03 sunknudsen

@sunknudsen Some system may restrict which files can be executed as sudo. I can imagine that a mounted path will provably fall under this restriction in a security hardened system.

azubieta avatar Mar 19 '21 15:03 azubieta

@azubieta Naïve question... running VeraCrypt AppImage as root (which is likely a bad idea) works... does this reveal anything we could use to troubleshoot the issue?

Is it possible AppImage doesn't have /usr/bin/ in its PATH?

sunknudsen avatar Mar 19 '21 16:03 sunknudsen

does this reveal anything we could use to troubleshoot the issue?

Maybe you could share the AppImage in question for analysis

Is it possible AppImage doesn't have /usr/bin/ in its PATH?

It's possible, but in the log you shared it "seems" to be using a full path.

azubieta avatar Mar 19 '21 16:03 azubieta

Maybe you could share the AppImage in question for analysis

@azubieta Sure, here it is including PGP signature.

veracrypt-1.24-Update7.zip

Thanks for helping out!

sunknudsen avatar Mar 19 '21 16:03 sunknudsen

It's possible, but in the log you shared it "seems" to be using a full path.

@azubieta I meant that /usr/bin would not be in PATH environment variable so sudo is not found.

sunknudsen avatar Mar 19 '21 17:03 sunknudsen

Is this applicable here? https://github.com/AppImage/AppImageKit/issues/146#issuecomment-220702575

In any case, what happens if you run sudo <your AppImage>?

probonopd avatar Mar 19 '21 19:03 probonopd

@probonopd Thanks for helping out... running AppImage using sudo works although file navigator (in VeraCrypt) doesn't include some paths (such as external flash drives) included when running as unprivileged user on Tails (in other words, UX is a little broken, but I am able to mount encrypted volume).

sunknudsen avatar Mar 19 '21 19:03 sunknudsen

Try sudo -E ... to preserve the environment variables.

probonopd avatar Mar 20 '21 10:03 probonopd