[GH-ISSUE #3912] Chrome not working due to symlink. #2452

Closed
opened 2026-05-05 09:08:21 -06:00 by gitea-mirror · 6 comments
Owner

Originally created by @panbroggi on GitHub (Jan 23, 2021).
Original GitHub issue: https://github.com/netblue30/firejail/issues/3912

Hi everyone!
I am using firejail version 0.9.64 with google-chrome-unstable with KaOS.
While the simple firejail --noprofile google-chrome-unstable works, the default command

firejail google-chrome-unstable

fails. The output is

Reading profile /etc/firejail/google-chrome-unstable.profile
Reading profile /etc/firejail/chromium-common.profile
Reading profile /etc/firejail/disable-common.inc
Reading profile /etc/firejail/disable-devel.inc
Reading profile /etc/firejail/disable-exec.inc
Reading profile /etc/firejail/disable-interpreters.inc
Reading profile /etc/firejail/disable-programs.inc
Reading profile /etc/firejail/whitelist-common.inc
Parent pid 29605, child pid 29606
Warning: An abstract unix socket for session D-BUS might still be available. Use --net or remove unix from --protocol set.
Error: invalid whitelist path /home/panbroggi/Scaricati
Error: proc 29605 cannot sync with peer: unexpected EOF
Peer 29606 unexpectedly exited with status 1

The problem is that /home/panbroggi/Scaricati (which is the italian Download folder) is a symbolic link to /mnt/Storage/Scaricati. I've tried to edit the profile and if I replace
whitelist ${DOWNLOADS} with mkdir ${HOME}/Scaricati it starts, obviously without keeping the download folder.

I've tried using firetools and this configuration works:
https://imgur.com/a/GOHsh5Z

while this does not:
https://imgur.com/a/9hxYJjd

What should I do to set it up correctly?

Originally created by @panbroggi on GitHub (Jan 23, 2021). Original GitHub issue: https://github.com/netblue30/firejail/issues/3912 Hi everyone! I am using firejail version 0.9.64 with google-chrome-unstable with KaOS. While the simple `firejail --noprofile google-chrome-unstable` works, the default command ``` firejail google-chrome-unstable ``` fails. The output is ``` Reading profile /etc/firejail/google-chrome-unstable.profile Reading profile /etc/firejail/chromium-common.profile Reading profile /etc/firejail/disable-common.inc Reading profile /etc/firejail/disable-devel.inc Reading profile /etc/firejail/disable-exec.inc Reading profile /etc/firejail/disable-interpreters.inc Reading profile /etc/firejail/disable-programs.inc Reading profile /etc/firejail/whitelist-common.inc Parent pid 29605, child pid 29606 Warning: An abstract unix socket for session D-BUS might still be available. Use --net or remove unix from --protocol set. Error: invalid whitelist path /home/panbroggi/Scaricati Error: proc 29605 cannot sync with peer: unexpected EOF Peer 29606 unexpectedly exited with status 1 ``` The problem is that ``/home/panbroggi/Scaricati`` (which is the italian Download folder) is a symbolic link to ``/mnt/Storage/Scaricati``. I've tried to edit the profile and if I replace ``whitelist ${DOWNLOADS}`` with ``mkdir ${HOME}/Scaricati`` it starts, obviously without keeping the download folder. I've tried using firetools and this configuration works: https://imgur.com/a/GOHsh5Z while this does not: https://imgur.com/a/9hxYJjd What should I do to set it up correctly?
Author
Owner

@smitsohu commented on GitHub (Jan 23, 2021):

/etc/firejail/firejail.config has a setting

# Follow symlink as user. While using --whitelist feature,
# symlinks pointing outside home directory are followed only
# if both the link and the real file are owned by the user.
# Enabled by default
# follow-symlink-as-user yes

Could that be the reason?

<!-- gh-comment-id:766109937 --> @smitsohu commented on GitHub (Jan 23, 2021): /etc/firejail/firejail.config has a setting ``` # Follow symlink as user. While using --whitelist feature, # symlinks pointing outside home directory are followed only # if both the link and the real file are owned by the user. # Enabled by default # follow-symlink-as-user yes ``` Could that be the reason?
Author
Owner

@panbroggi commented on GitHub (Jan 23, 2021):

This is the case. Changing the owner solves the problem.
Thank You!

<!-- gh-comment-id:766143835 --> @panbroggi commented on GitHub (Jan 23, 2021): This is the case. Changing the owner solves the problem. Thank You!
Author
Owner

@ghost commented on GitHub (Jan 24, 2021):

Closing here as the issue is fixed.

<!-- gh-comment-id:766283528 --> @ghost commented on GitHub (Jan 24, 2021): Closing here as the issue is fixed.
Author
Owner

@panbroggi commented on GitHub (Jan 30, 2021):

Updating to 0.9.64.2 broke the configuration. I tried to comment disable-mnt in the profile, but the browser sees the symlink (a 0 B file) and the content is no more accessible. Is it possible to adjust the settings or a downgrade is the only solution?

EDIT: commenting disable-mnt actually worked; I then manually blacklisted all the folders in /mnt/Storage except for the linked one.

<!-- gh-comment-id:770180724 --> @panbroggi commented on GitHub (Jan 30, 2021): Updating to 0.9.64.2 broke the configuration. I tried to comment ``disable-mnt`` in the profile, but the browser sees the symlink (a 0 B file) and the content is no more accessible. Is it possible to adjust the settings or a downgrade is the only solution? EDIT: commenting ``disable-mnt`` actually worked; I then manually blacklisted all the folders in /mnt/Storage except for the linked one.
Author
Owner

@rusty-snake commented on GitHub (Jan 30, 2021):

commenting disable-mnt actually worked; I then manually blacklisted all the folders in /mnt/Storage except for the linked one.

Then you can add one of the following to your google-chrome-unstable.local.

ignore disable-mnt
noblacklist /mnt/Storage
noblacklist /mnt/Storage/Scaricati
blacklist /media
blacklist /mnt/*
blacklist /mnt/Storage/*
blacklist /run/mnt
blacklist /run/media
ignore disable-mnt
blacklist /media
blacklist /run/mnt
blacklist /run/media
whitelist /mnt/Storage/Scaricati

EDIT: fixed typo

<!-- gh-comment-id:770192450 --> @rusty-snake commented on GitHub (Jan 30, 2021): > commenting disable-mnt actually worked; I then manually blacklisted all the folders in /mnt/Storage except for the linked one. Then you can add one of the following to your `google-chrome-unstable.local`. ``` ignore disable-mnt noblacklist /mnt/Storage noblacklist /mnt/Storage/Scaricati blacklist /media blacklist /mnt/* blacklist /mnt/Storage/* blacklist /run/mnt blacklist /run/media ``` ``` ignore disable-mnt blacklist /media blacklist /run/mnt blacklist /run/media whitelist /mnt/Storage/Scaricati ``` EDIT: fixed typo
Author
Owner

@panbroggi commented on GitHub (Jan 30, 2021):

Oh, thanks! Adding the lines before including chromium-common.profile is actually the proper way.

In case someone needs to copy paste the code, there's a small typo: balcklist /media/ instead of blacklist /media/.

<!-- gh-comment-id:770195430 --> @panbroggi commented on GitHub (Jan 30, 2021): Oh, thanks! Adding the lines before including ``chromium-common.profile`` is actually the proper way. In case someone needs to copy paste the code, there's a small typo: ``balcklist /media/`` instead of ``blacklist /media/``.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/firejail#2452
No description provided.