mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #4667] mpv does not see files in certain directories #2740
Labels
No labels
LTS merge
LTS merge
bug
bug
converted-to-discussion
doc-todo
documentation
duplicate
enhancement
file-transfer
firecfg
firejail-in-firejail
firetools
graphics
help wanted
information_old
installation
invalid
modif
moved
needinfo
networking
notabug
notourbug
old-version
overlayfs
packaging
profile-request
pull-request
question
question_old
removal
runtime-permissions
sandbox-ipc
security
stale
wiki
wiki
wontfix
wordpress
workaround
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/firejail#2740
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @rieje on GitHub (Nov 4, 2021).
Original GitHub issue: https://github.com/netblue30/firejail/issues/4667
Description
mpv using firejail does not see file (see output below under "Log") in certain directories/drives. Some directories/drives have no issues. No issues whatsoever when firejail is not used.
Expected behavior
mpv plays video.
Actual behavior
mpv did not play video (see output below under "Log").
Behavior without a profile
What changed calling
LC_ALL=C firejail --noprofile /usr/bin/mpv <file>in a terminal?Video plays as expected.
Environment
Checklist
/usr/bin/vlc) "fixes" it).https://github.com/netblue30/firejail/issues/1139)Log
Output of
LC_ALL=C firejail /usr/bin/mpv <file>(current directory~/rieje/temp/temp2/video.mkv). Specifiedfileboth using relative path and absolute path.Output of
LC_ALL=C firejail --debug /usr/bin/mpv `: https://0x0.st/-5i2.txt@ghost commented on GitHub (Nov 4, 2021):
The current mpv profile allows playing media files found in whitelisted paths from whitelist-player-common.inc:
What happens when you add
whitelist ${HOME}/temp/temp2to mpv.local OR whitelist-player-common.local? If that works, you can add other paths you want to allow accordingly.@rieje commented on GitHub (Nov 5, 2021):
@glitsj16 I thought it might be the case where firejail whitelists e.g. all XDG user dirs, but I am still able to play a video from
/data/torrents/torrentedeven though neither/datanor/data/torrents/torrentedare explicitly whitelisted. Anyway, I whitelisted${HOME}/temp/temp2in mpv.local as you've suggested and that works.I have the following:
I do not have a symlink to e.g.
/datafrom "$HOME" or any other whitelisted directories (if that matters, i.e. if whitelisting follows symlinked sub directories) and agreponwhitelistin/etc/firejailand~/.config/firejaildid not show the directory as being whitelisted.@ghost commented on GitHub (Nov 5, 2021):
Not all XDG dirs are whitelisted (as shown above). Place a video file into ${DOCUMENTS} (your $HOME/documents) for example and try to play it with mpv. MPV should not be able to open files in that location.
As to your
/datafolder. This is not specifically blacklisted anywhere in Firejail AFAICT. Does your user owns that dir or anything below it? You might want toblacklist /datain yourglobals.localandnoblacklist /datainmpv.localto block firejailed apps other than mpv from accessing that path.@rusty-snake commented on GitHub (Nov 5, 2021):
In firejail 0.9.66 you should be able to
whitelistinside/data.@rieje commented on GitHub (Nov 5, 2021):
@glitsj16 Yes, /data is owned by the user. Where can why a user owned directory is not automatically blacklisted to understand more?
@kmk3 commented on GitHub (Nov 26, 2021):
@rieje commented on Nov 5:
/data is not part of the Linux FHS nor a directory that exists by default on
most distros AFAIK.
I know that there are pages on the Arch Wiki that suggest putting things in
/data, but it does not exist in Arch by default.
firejail only blacklists paths that either exist by default or that are very
common (see /etc/firejail/disable-common.inc and
/etc/firejail/disable-programs.inc) and users are expected to add their custom
directories to their own profiles (such as on globals.local). Maybe /data
could be added to disable-common.inc, but I don't know if it's a good idea, as
it's unclear what exactly would be in there for any given user, so it could
cause more confusion than it's worth.