-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
Appimage cant be run due to permissions #2246
Comments
Are there any update on this? I am getting the same problem on Kali (being root on default account). When I use the I am using v1.0.177 appimage running Kali on 4.19.28 in vmware v1.0.175 does work properly. |
Since version 1.0.178 I also get the error on my Debian system. Version 1.0.175 runs without errors. |
I just ran backwards from the latest version of the app images and I can confirm that version 1.0.176 is the last version that runs without issue on Debian Testing. 177 and 178 both fail to run with the above mentioned issues and behaviour. |
I can confirm the issue on Debian Bullseye (Testing). A temporary workaround is to set Edit: The workaround posted below is a better option that does not open you up to security vulnerabilities. The steps are as follows:
|
Run the AppImage with --appimage-extract then fix the permission However as of now appimage packaging is broken for Debian based distros since messing with distro permissions should not even be considered to run an app. |
@tessus anyway this could possibly be marked as an upstream bug since it seems to be a Debian specific issue not related to Joplin? |
We switched to Electron 7. Apparently that was not a problem with Electron 4 or the builder which creates the image. Unfortunately there is nothing we can do in Joplin. So how do you run other sandboxed Electron apps on Debian buster? This is not Joplin specific. |
I use Trilium and Riot as well and those do not seem to have any issues of such. Riot had it for a minute but they resolved it back then, not sure how they did it. |
They probably set the kernel parameter before starting the app or removed the sandbox. Either way, this is not a Joplin specific issue. Set the kernel paramter properly and all is good. Please ask debian why the heck they think that running a sandboxed app as a non-root user is a bad thing? Or any distro really, which uses this idiotic default. Maybe Laurent has an idea how to solve this in Joplin, but IMO this is not a Joplin issue. |
I doubt that a package would be allowed modify kernel parameters at will like that, but it is a curious case for sure. |
You are right of course. Not sure why I thought it could. Maybe I mixed it up with an ENV var and a different issue. Let's see, if Laurent can come up with something. Btw, here's also a discussion going on: https://discourse.joplinapp.org/t/the-new-appimage-joplin-1-0-177-appimage-installation-issues/4966?u=tessus |
I think it is something to do with .appimage packaging Becasue those apps I mentioned are provided as .deb packages. |
IMO the script or tool or whatever created the AppImage has to be fixed. |
Not idiotic default because is more secure and after all is Chromium/Electron upstream related and not Linux specific: https://chromium.googlesource.com/chromium/src/+/master/docs/design/sandbox.md |
@tessus and @diogogomes , according to the official builder documentation, debian packages can be built from the same script as AppImages. Idk if it matters if the build system is debian or not. |
I don't work with electron but do you think that this can help? |
That honestly doesn't look valuable at all to what is happening here. That just explains how to enable and disable the sandbox and the pros and cons for just that |
Okay. I thought that the issue was how to enable the sandbox and it seems not fixed yet in the electron builder for appimages, only for snap and deb packages. I hope you can find a solution. |
In many cases they run it with the I think for the most part, running the electron app without the electron sandbox as an AppImage could be ok if you used AppImage sandboxing such as firejail.
The issue is the other way around and not with Debian, but with electron (see electron-userland/electron-builder#4495). Electron requires to run the It might also be worth reviving the thread in #738 and taking another good look at snap packages. |
I stumbled upon exactly the same Electron/Debian problem with other software. Can someone have a look? This could be fixed in the Electron as I understand. |
For information, there's a script that can be used to fix this: electron-userland/electron-builder#4495 (comment) Although it would need to be done as part of the build process. |
Joplin is now in the Kali 2020.02 repos BTW - a sudo apt install joplin will do the trick |
The same applies for Parrot OS |
UPDATE: I did succeed with the installation using the AppImage installer app, despite receiving countless various errors it did install the app. I ended up with two shortcuts though. Folks, I am new on Linux, installed Ubuntu a few days ago on two PC (tried installing Linux twice in my life years ago), I switched now from Win10, uninstalled Win and loved the Standard Note app on Ubuntu (from store) but now on Debian testing it is impoossible to install and use thsi amazing Standard Note app because of this nightmare AppImage whatever solutution. All I get are various scary error messages, failures, popup error windows whatever commands I type in from "Linux guru" websites. --no -sandbox" or what it says and many other errors. Cannot run it, cannot have a shortcut for it etc Everythig was perfect on this Debian 10 but now after one day on it this AppImages whatever ruined my experience and demolished my trust in Debian, Linux again. here is the file. Anyone could tell me how to install and run this on the latest Debian 10 test ? |
@easthvan |
Hi, Thanks for the response. I guess I was focusing too much on tat specific app (Standard Notes), but I assumed that my case is exactly the same as its in the title of this thread, AppImage cannot be run due to permissions as I have received similar errors as some other people described here. But thanks for suggesting a Linux support forum! as a noob every help is help for me. |
To follow up on this, with the latest version (1.4.19), I believe in step 4 you want to change the exec line to |
@dylanmorroll For the record, if you're going to bother unpacking the AppImage and changing perms to make Joplin run, why not |
Like you say @scruloose, it makes sense if chrome-sandbox is from an apt package manager installed binary. This will work for lot's of Electron apps that come as appimages, not just Joplin. So, to start: seems like the package from With that in mind lets get going (you'll have to edit these commands depending on your download location and user name): # install a trusted and signed package with the needed sandbox binary (it's only 800KB total or so)
apt install chromium-sandbox
# Create and cd to a dedicated joplin dir
mkdir /home/your_username/myapps/joplin
cd /home/your_username/myapps/joplin
# Make the downloaded Appimage executable
chmod +x /home/your_username/downloads/Joplin-insert-version-here.AppImage
# Extract the downloaded appimage to the joplin dir
/home/your_username/downloads/Joplin-insert-version-here.AppImage --appimage-extract
# cd into the extracted filesystem-root folder
cd squashfs-root
# Backup appimage inluded sandbox binary
mv chrome-sandbox chrome-sandbox.bak
# Symlink to the apt installed sandbox binary
ln -s /usr/lib/chromium/chrome-sandbox chrome-sandbox
# Run joplin from current dir
./AppRun To upgrade it's the same story as installing, just start by deleting squashfs folder For launcher/desktop shortcut create a file File:
(edited to include make download executable in order to extract it, and launcher .desktop file) |
It works perfectly fine for me, thanks!
|
Thank you @guerrajose. I updated my answer which fixes the typos.
|
@weleoka Doesn't using /usr/lib/chromium/chrome-sandbox diminish the sandboxing, breaking the isolation between all apps that use |
@mYnDstrEAm I'm not an expert in the subject, but I'm reasonably sure the answer is no. The point of that chrome-sandbox utility is that whenever a user invokes it, it starts with root privileges, uses those privileges to set up a (new, unique, temporary) sandboxed environment, then drops root and runs the target program as the regular user who invoked it, inside the sandbox. Keep in mind that if different users run a program from a shared system location ( Trusting the distro-supplied |
Debian has enabled user namespaces in the 5.10 kernel currently available in unstable. It should be available soon in Bullseye so user namespaces will be enabled in the next stable release expected this year. |
Thanks for the info @weleoka! In my case (Debian stable) I get:
But as @arrowmaster said
This should be (hopefully!) solved in the next stable release, if gets 5.10 Kernel |
Yes, it has. I'm currently on Bullseye with kernel 5.10.5, just checked and Joplin can now be run without the |
Can this be closed then? |
I think so, officially the Debian patch that disabled user namespaces (that causes this issue) was removed in Dec 2020 according to https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=898446 If you run the Debian 10 (Buster) stable kernel 4.19 you will still be affected by this issue. |
Thanks, I'll close the issue then but feel free to reopen if needed. |
Instead of creating a new issue, thought I'd just post it here instead as I recently encountered this on Arch. Initial ErrorI wanted to post this in case anyone encountered the same error. Running the joplin desktop produces the following error:
This happened after a system upgrade. Running chmod on the sandbox bin did not fix the error. Work Around
The solution is similar to the one mentioned above, but IMO is simpler. There could be advantages to the above solution that I am not aware of though. |
Hi
The Joplin-1.0.177.AppImage version seems to be having some issue with permissions. Since this is not a proper app it is not possible fix the permission prior to launching and running with
sudo
also givesRunning as root without --no-sandbox is not supported. See https://crbug.com/638180
I am running it on Debian bullseye/sid
The text was updated successfully, but these errors were encountered: