#968382 element-desktop: /var/lib/flatpak/exports/share/dconf/profile/user: Permission denied

#968382#5
Date:
2020-08-14 07:56:53 UTC
From:
To:
element-desktop as installed via the Debian package does not start with firejail.

 ~ $ firejail /opt/Element/element-desktop --no-sandbox
Reading profile /etc/firejail/element-desktop.profile
Reading profile /etc/firejail/riot-desktop.profile
Reading profile /etc/firejail/riot-web.profile
Reading profile /etc/firejail/whitelist-common.inc
Reading profile /etc/firejail/whitelist-common.local
Reading profile /etc/firejail/electron.profile
Reading profile /etc/firejail/disable-common.inc
Reading profile /etc/firejail/disable-passwdmgr.inc
Reading profile /etc/firejail/disable-programs.inc
Warning: networking feature is disabled in Firejail configuration file
Parent pid 16628, child pid 16629
Private /opt installed in 545.76 ms
Warning: An abstract unix socket for session D-BUS might still be available. Use --net or remove unix from --protocol set.
Post-exec seccomp protector enabled
Seccomp list in: !chroot, check list: @default-keep, prelist: unknown,
Child process initialized in 591.56 ms
/home/hans/.config/Element exists: no
/home/hans/.config/Riot exists: yes
Using legacy user data path: /home/hans/.config/Riot
(node:8) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.

(element-desktop:8): dconf-WARNING **: 09:51:34.251: Unable to open /var/lib/flatpak/exports/share/dconf/profile/user: Permission denied
Starting auto update with base URL: https://packages.riot.im/desktop/update/
Auto update not supported on this platform
[50:0814/095134.384213:FATAL:platform_shared_memory_region_posix.cc(254)] This is frequently caused by incorrect permissions on /dev/shm.  Try 'sudo chmod 1777 /dev/shm' to fix.
^C
Parent received signal 2, shutting down the child process...

Child received signal 2, shutting down the sandbox...

Parent is shutting down, bye...
 ~ $ ls -ld /var/lib/flatpak/exports/share/dconf/profile/user
ls: cannot access '/var/lib/flatpak/exports/share/dconf/profile/user': No such file or directory
 ~ $ ls -ld /var/lib/flatpak/exports/share/dconf/profile/
ls: cannot access '/var/lib/flatpak/exports/share/dconf/profile/': No such file or directory
 ~ $ ls -ld /var/lib/flatpak/exports/share/dconf/
ls: cannot access '/var/lib/flatpak/exports/share/dconf/': No such file or directory
 ~ $ ls -ld /var/lib/flatpak/exports/share/
drwxr-xr-x 4 root root 4096 Apr 12  2019 /var/lib/flatpak/exports/share/

#968382#10
Date:
2020-08-14 08:29:57 UTC
From:
To:
Hi Hans,

The error message looked a bit different for me:

It turned out that "nodbus" from electron.profile (which gets included) was the problem.
So I added "ignore nodbus" to element-desktop.profile and it was starting.
Does this also work for you?

Regards,
  Reiner

#968382#17
Date:
2020-08-14 17:57:00 UTC
From:
To:
Adding this to element-desktop.profile made the Permission denied error
go away, but it still didn't start:

whitelist /var/lib/flatpak/exports/share/dconf/profile/user


So it seems the /dev/shm error is the notable one. I tried adding
"ignore nodbus" at the end of element-desktop.profile, at the beginning
of element-desktop.profile, and both. None of those changed the /dev/shm
error. And Element never started.

#968382#22
Date:
2020-08-14 18:15:14 UTC
From:
To:
Control: forwarded -1 https://github.com/netblue30/firejail/issues/3586

Hm, that is weird, as I also have the same error about /dev/shm, but for
me element is starting (at least it shows a tray icon, and I can open
the main window; though it stays white (probably for a different reason
as it behaves the same without firejail)).

I initially had the problem that the tray icon was not shown because of
nodbus, maybe due to some other reason your WM/DE does not show the tray
icon...

Otherwise I'm currently out of ideas where the problem could be.

Regards,
  Reiner

#968382#29
Date:
2021-06-11 20:07:43 UTC
From:
To:
Hi Hans,

I just upgraded element-desktop (to 1.7.30) and it seems to run fine
with firejail now (tested with firejail 0.9.64.4).
Do you still have problems with it?

Kind regards,
  Reiner