electron-builder icon indicating copy to clipboard operation
electron-builder copied to clipboard

.AppImage extract files to /tmp with a wrong or strange permission for sudo user

Open athenakia opened this issue 3 years ago • 4 comments

  • Electron-Builder Version: 22.14.13
  • Node Version: v16.13.2
  • Electron Version: 15.5.2
  • Electron Type (current, beta, nightly): current
  • Target:
{
  "target": "AppImage",
  "arch": [
    "x64",
    "arm64"
  ]
}

Operating System: Ubuntu 20.04.2 LTS Kernel: Linux 5.4.0-107-generic Architecture: arm64

demo

I'm building a Electron for Linux and package in AppImage. Every time when I run this app, it will extract its all files to /tmp/.mountAppNameXXX. As the screenshot shows, the .mount_xxx directory has a wrong or strange permission for super user or root. When using ls as a normal user, the permission display is all right. But when using ls as super user, the permission is all ??? In my situation, I want to copy a config template to a path which only super user can access, so I have to copy file in .mount_XXX with sudo but I cannot access all files in .mount_XXX. And anything I do with sudo to change its ownership or permission return "Permission denied"

athenakia avatar Apr 14 '22 17:04 athenakia

Every time when I run this app, it will extract its all files

No.

It mounts the files there. It does NOT extract them there. FUSE by default does not allow other users, including root, access its mounts.

So, works as designed.

probonopd avatar Apr 16 '22 20:04 probonopd

So how could I copy a config template bundled in app resource to a path which only super user can access? Any idea?

athenakia avatar Apr 21 '22 03:04 athenakia

So how could I copy a config template bundled in app resource

Your application needs to copy it out of the AppImage.

to a path which only super user can access?

Which means that your user needs to run the AppImage as root so that it can write to, e.g., /root.

probonopd avatar Apr 21 '22 21:04 probonopd

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.

github-actions[bot] avatar Jun 02 '25 00:06 github-actions[bot]

This issue was closed because it has been stalled for 30 days with no activity.

github-actions[bot] avatar Jul 03 '25 00:07 github-actions[bot]