mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #2833] mpv (w/ ytdl) fails, but ytdl works standalone #1771
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#1771
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 @hautecodure on GitHub (Jul 6, 2019).
Original GitHub issue: https://github.com/netblue30/firejail/issues/2833
Hi,
I seem to have a weird issue where im unable to use
mpvytdl, butytdlworks fine standalone.Setup:
youtube-dl- 2019.07.02 (installed viapipin the user directory~/.local/bin/youtube-dl)mpv- 0.29.1firejail- 0.9.60Running:
Results in:
Running the command from the output above:
Seems to work as expected (
youtube-dlreturns a serialized JSON object).The
custom.profile, I'm currently testing with is the following:Any ideas how i might debug this further?
@ghost commented on GitHub (Jul 7, 2019):
@enilfodne I cannot reproduce, your first command works fine for me. What you're seeing might be due to youtube-dl parameters in your mpv config file(s). Both mpv and youtube-dl have a pile of options and I'm guessing you might have stale or breaking
ytdl-raw-optionshanging around. Does it work if you temporarily move any mpv configuration out of the way?@hautecodure commented on GitHub (Jul 7, 2019):
Thanks for the suggestion, I've removed the configuration folder, but it doesn't seem to change anything (the log looks identical).
@rusty-snake commented on GitHub (Jul 7, 2019):
@enilfodne does mpv + ytdl work without firejail? (
sudo firecfg --clear,mpv --msg-level=ytdl_hook=debug -v "https://www.youtube.com/watch?v=tTGXBK69f0s")@hautecodure commented on GitHub (Jul 7, 2019):
Yes,
mpvworks fine outsidefirejail.Ok, so the culprit is that I've installed
youtube-dllocally (pip install --user). When installed system-wide (sudo pip install), everything works as expected.Any ideas how i can change my profile to accommodate a local install?
@ghost commented on GitHub (Jul 7, 2019):
@enilfodne Nice catch. If you still want youtube-dl installed under your ${HOME}, I believe you'd need
ignore noexec ${HOME}for 0.9.60. Both profiles have seen changes since that release, so you might look at these in git master to double-check if you're covering all bases in your custom profile. On a side-note, including both mpv.profile and youtube-dl.profile from /etc/firejail might cause unexpected conflicts. I would advise to make a single custom profile based on mpv.profile and add in what is needed to accommodate for a locally installed youtube-dl.@rusty-snake commented on GitHub (Jul 7, 2019):
@enilfodne
Isn't a goog idea, because youtube-dl.profile contains
machine-idwhich break sound, ...mpv.profile and youtube-dl.profile are both no
whitelisting profiles, that will break mpv-config and more.mpv.profilealready allow python.Try as
custom.profile:@rusty-snake commented on GitHub (Jul 7, 2019):
@glitsj16 was faster, but my network to slow 😀 .
@hautecodure commented on GitHub (Jul 7, 2019):
Thank you for the taking the time to write this.
It's working as expected, but only one minor issue remains. How can i get this integrated with a
firefoxprofile? Reason being is that i want to utilizeff2mpv, which is a bridge betweenfirefoxandmpv.@rusty-snake commented on GitHub (Jul 7, 2019):
Or as a script to force mpv to use ytdl with serveral URLs and strict firejail sandbox:
@rusty-snake commented on GitHub (Jul 7, 2019):
@enilfodne
firefox.local:First check if mpv+ytdl can run under the firefox profile.
firejail --profile=firefox mpv "ytdl://SOMETHING"@hautecodure commented on GitHub (Jul 7, 2019):
Apologies for misleading you, but the
custom.profileabove and thecliexample are not working. I can executeyoutube-dl, butmpvcan't find it. It appears thatignore noexec ${HOME}is not enough.@rusty-snake commented on GitHub (Jul 7, 2019):
@enilfodne
firejail --noprofile mpv "ytdl://SOMETHING".I'm assuming that
${HOME}/.local/bin/is in$PATH.@hautecodure commented on GitHub (Jul 7, 2019):
Yes
~/.local/binis inPATHand the example above works (noprofile).When trying to run it through (
mpv) profile, it fails.Its embarrassing, but i forgot to check the logs, clearly it states:
I've got
mpvprofile to work by:ignore noexec ${HOME}tompv.localapparmorfrommpv.profileIs there more info on the
apparmorcommand, so i can debug this further?@rusty-snake commented on GitHub (Jul 7, 2019):
@enilfodne
apparmoruse the firejail-default AA profile. That you use AA make some error clear, but I'm wondering that you need to commentseccomp.seccomp: uncomment it (leaveapparmorcommentet),sudo journalctl | grep syscall@rusty-snake commented on GitHub (Jul 7, 2019):
You can first ignore
apparmor, because if you want to firefox has a own AA profile AFAIK.@hautecodure commented on GitHub (Jul 7, 2019):
Removing
apparmorfrom thefirefox-common.profile(same with thempv.profile) and everything works as expected.Would this reduce the security or negatively impact the isolation when
mpvandyoutube-dlare spawned within the samefirefoxsandbox?@rusty-snake commented on GitHub (Jul 7, 2019):
Yes, you should consider tweaking the FF-AA-Profile instead, but there I can't help you.
@hautecodure commented on GitHub (Jul 7, 2019):
After looking at
firejail-default, there's a comment stating:thus uncommenting:
Fixed all those problems and allowed me to re-enable
apparmoron all profiles.Thanks again for taking some time to help me debug this.
@rusty-snake commented on GitHub (Jul 7, 2019):
@enilfodne closing here, please fell free to reopen if you have more questions.