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

boxxy + AppImage ? => fusermount : mount failed: Operation not permitted #142

Closed
yduf opened this issue Oct 29, 2023 · 5 comments
Closed

Comments

@yduf
Copy link

yduf commented Oct 29, 2023

Hello,

I am trying to use boxxy with an AppImage packaged application (digikam),
and it fails at the early start of the application.

I have added the logs below.
Regards,

Yves.

./boxxy -l debug ~/app/digiKam-8.1.0-x86-64.appimage
 DEBUG boxxy::config > loading rules (not asked not to!)
 DEBUG boxxy::config > searching for boxxy config starting at /home/yves/App-sources/boxxy-v0.8.1-x86_64-unknown-linux-gnu
 DEBUG boxxy::config > checking for: /home/yves/App-sources/boxxy-v0.8.1-x86_64-unknown-linux-gnu/boxxy.yaml
 DEBUG boxxy::config > checking for: /home/yves/App-sources/boxxy.yaml
 DEBUG boxxy::config > checking for: /home/yves/boxxy.yaml
 DEBUG boxxy::config > checking for: /home/boxxy.yaml
 DEBUG boxxy::config > checking for: /boxxy.yaml
 DEBUG boxxy::config > ran out of parents to search!
 INFO  boxxy::config > loaded 0 total rule(s)
 DEBUG boxxy::enclosure > setup root
 DEBUG boxxy::enclosure::fs > setting up root for long-band-0214
 DEBUG boxxy::enclosure     > bind mount root rw
 DEBUG boxxy::enclosure::fs > bind mount "/" onto "/tmp/boxxy-containers/long-band-0214" as rw
 DEBUG boxxy::enclosure::fs > bind mount "/" onto "/tmp/boxxy-containers/long-band-0214"
 DEBUG boxxy::enclosure     > applying 0 rules
 DEBUG boxxy::enclosure     > chrooted to /tmp/boxxy-containers/long-band-0214
 DEBUG boxxy::enclosure > child stopped!
 DEBUG boxxy::enclosure::linux > mapped uids {
    Uid(
        1000,
    ): Uid(
        1000,
    ),
}
 DEBUG boxxy::enclosure::linux > mapped gids {
    Gid(
        1000,
    ): Gid(
        1000,
    ),
}
 DEBUG boxxy::enclosure        > finished setting up uid/gid mapping
 DEBUG boxxy::enclosure     > setting CHILD_SUBREAPER to 90184
 DEBUG boxxy::enclosure     > running command: "/home/yves/app/digiKam-8.1.0-x86-64.appimage"
 INFO  boxxy::enclosure     > boxed "/home/yves/app/digiKam-8.1.0-x86-64.appimage" ♥
 DEBUG boxxy::enclosure     > and spawn!
fusermount: mount failed: Operation not permitted

Cannot mount AppImage, please check your FUSE setup.
You might still be able to extract the contents of this AppImage 
if you run it with the --appimage-extract option. 
See https://github.com/AppImage/AppImageKit/wiki/FUSE 
for more information
open dir error: No such file or directory
 DEBUG boxxy::enclosure     > primary child exited with status 32512!
 DEBUG boxxy::enclosure     > execution finished!
 DEBUG boxxy::enclosure     > command exited with status: Child { stdin: None, stdout: None, stderr: None, .. }
 DEBUG boxxy::enclosure::fs    > cleaning up root for long-band-0214
 DEBUG boxxy::enclosure        > cleaning up 0 path(s) ♥
 DEBUG boxxy::enclosure        > exiting with status 0
@yduf
Copy link
Author

yduf commented Oct 29, 2023

By Curiosity I followed up the url: https://github.com/AppImage/AppImageKit/wiki/FUSE
There is a docker topic, that say:
When running an AppImage from a Docker container you will get the following error:
fuse: failed to open /dev/fuse: Operation not permitted
Could not mount AppImage
Please see https://github.com/probonopd/AppImageKit/wiki/FUSE

I followed the advice and I just use the--appimage-extract-and-runparameter to the AppImage in your build script, like so

 ./boxxy -l debug ~/app/digiKam-8.1.0-x86-64.appimage --appimage-extract-and-run

And it does seem to work.

@yduf yduf closed this as completed Oct 29, 2023
@queer
Copy link
Owner

queer commented Oct 30, 2023

Thank you for the report! I have released v0.8.2 (once it finishes building) that will provide more-verbose error messages around this particular issue:

@yduf
Copy link
Author

yduf commented Nov 9, 2023

Hello again,
I am still facing an issue, that I didn't notice at first ( I have tested with boxxy 0.8.1 & 0.8.3 the behavior is the same, except that I can't use the on the fly extraction with 0.8.3 since it want the AppImage been extracted first before running it).

With the workaround above, when I launch digikam with boxxy like this:

$ ./boxxy-0.8.1 ~/app/digiKam-8.1.0-x86-64.appimage --appimage-extract-and-run
# or with
$ ./boxxy-0.8.3 ~/app/digikam-extracted/AppRun

The image is able to start.
I am also able to see that rewrite "~/.config/digikamrc-test" is created according to the rule in my config (see config below).
But latter on, boxxy? is complaining about not being able to write to the original files (I assume it's boxxy, because unknown is higlighed the same way as for -l debug message):

unknown: Couldn't write "/home/yves/.config/digikamrc" . Disk full?

And naturally this file is writable and disk is not full...
The other thing is that the target and the rewrite are both created (even when starting clean)?

$ ls -l ~/.config/digikamrc*
-rw-rw-r-- 1 yves yves 0 Nov  9 12:55 /home/yves/.config/digikamrc
-rw-rw-r-- 1 yves yves 0 Nov  9 12:55 /home/yves/.config/digikamrc-test

As this application is robust to that error, it works but does not save its configuration to the rewrite file.
So when I relaunch, it start from blank.

# ~/.config/boxxy/boxxy.yaml
rules:
- name: "digikam-test"
  target: "~/.config/digikamrc"
  rewrite: "~/.config/digikamrc-test"
  mode: "file"

@yduf yduf reopened this Nov 9, 2023
@queer
Copy link
Owner

queer commented Nov 15, 2023

Thank you for the report! I am currently unwell but will look into this when I'm better (:

@queer
Copy link
Owner

queer commented Dec 21, 2023

Hello! So sorry about the delay on my end. Self-extracting AppImages (--appimage-extract-and-run) should work again as of release 0.8.4. You also don't need to specify mode: "file" as ~/.config/digikamrc is a directory; "directory" is the default mode.

Please reopen this (or open a new issue) if you run into any more issues!

@queer queer closed this as completed Dec 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants