donatom
Posts: 7
Joined: Wed Mar 30, 2022 2:33 am

Fedora37.aarch64 and Jellyfin

Sat Nov 26, 2022 1:17 am

i just installed Fedora-xfce.aarch64 onto my RPi 4b which I did by using dd to copy the OS directly onto a SSD. It runs smoothly and doesn't take forever to boot up (with fedoraARM 36 booting took over 3 minutes).

The other day I installed Jellyfin (a media server like Plex - but it is 100% open-source). The best and easiest way is to follow the Jellyfin wiki https://jellyfin.org/docs/general/admin ... nstalling/ (scroll down to Podman - which is container software like Docker but open-source). Follow the Podman explanation to the end of the section.

It took only a few minutes (maybe 20) to install both Podman and Jellyfin. Everything worked well except that I could not get Jellyfin to access my video files which I have on a separate USB drive. I spent more than an hour changing permissions, etc on the directories and files - to no avail.

I even followed my own wiki about Jellyfin permissions which I placed on this forum last year without success.

I finally tried disabling selinux (sudo setenforce 0) which in fact did work. The obvious problem with this is that this makes your fedora system less secure. In any case I am writing in this forum to help others who are trying to run jellyfin on RPi with Fedora-aarch64 (by the way, using Podman is the only way to install Jellyfin on RPi with Fedora.

Hopefully Jellyfin/Podman fix this bug soon.

trejan
Posts: 5368
Joined: Tue Jul 02, 2019 2:28 pm

Re: Fedora37.aarch64 and Jellyfin

Sat Nov 26, 2022 2:43 am

donatom wrote:
Sat Nov 26, 2022 1:17 am
I finally tried disabling selinux (sudo setenforce 0) which in fact did work. The obvious problem with this is that this makes your fedora system less secure.
You need to read the SELinux audit log to see what is denying access then make a new policy module to allow Jellyfin. I don't have a Fedora system so can't check but there may be a SELinux boolean as well.

donatom
Posts: 7
Joined: Wed Mar 30, 2022 2:33 am

Re: Fedora37.aarch64 and Jellyfin

Tue Nov 29, 2022 4:57 pm

Thanks, Trajan. I will look into that as soon as I can.

donatom
Posts: 7
Joined: Wed Mar 30, 2022 2:33 am

Re: Fedora37.aarch64 and Jellyfin

Wed Nov 30, 2022 4:28 am

To solve the SELinux denial I ran grep "SELinux is preventing" /var/log/messages and saw that the denial was caused by badly labeled files in my media directory (/media/movies).

Following a suggestion from this site https://github.com/hardenedlinux/harbia ... denied.mkd I ran the following command in terminal: "sudo /sbin/restorecon -R -v /media/movies"

I believe that this has corrected the SELinux denial problem (I'm not exactly sure what is meant by "label" but I guess it indicates that SELinux can allow the use of the files in a directory).

donatom
Posts: 7
Joined: Wed Mar 30, 2022 2:33 am

Re: Fedora37.aarch64 and Jellyfin

Wed Nov 30, 2022 11:31 pm

This unfortunately did not solve the problem so I must continue searching for a solution (besides disabling SELinux).

According to the fedora wiki (https://www.redhat.com/sysadmin/selinux-denial2), you should run the following command to figure out why selinux is not allowing something: # grep "SELinux is preventing" /var/log/messages

The read read out will tell you the problem and will also give you suggestions to remedy the situation.

Now I am going to delete my jellyfin container and recreate it using a slightly different command (I will add --priveleged to the podman command, which -- according to https://github.com/jellyfin/jellyfin-docs/issues/317 should give jellyfin access to my media files.

donatom
Posts: 7
Joined: Wed Mar 30, 2022 2:33 am

Re: Fedora37.aarch64 and Jellyfin

Sat Dec 03, 2022 1:14 am

I spent hours trying to figure out how to fix selinux. However, it turned out to be the browser - I switched to chromium and now jellyfin can access media files - with selinux enabled.

It seems like firefox has a bug or two.

donatom
Posts: 7
Joined: Wed Mar 30, 2022 2:33 am

Re: Fedora37.aarch64 and Jellyfin

Wed Dec 07, 2022 9:19 pm

Well, using Chromium seemed to work - I could at least scan the media files, but when I tried to play files on my phone or television, jellyfin said that it was not able to play the movies.

Then I came across another RedHat selinux trouble-shooting wiki (https://access.redhat.com/documentation ... ng-selinux). I used "sealert -l "*"" as regular user. I saw that ffmpeg and ffprobe were being denied access to my movie files (/media/movies). i understand that jellyfin uses ffmpeg to play the files. I am not sure what ffprobe does, but I enabled access for it to be on the safe side.

Following the instructions from sealert -l "*" command I used the following commands, this time as root:

ausearch -c 'ffmpeg' --raw | audit2allow -M my-ffmpeg
semodule -i my-ffmpeg.pp
ausearch -c 'ffprobe' --raw | audit2allow -M my-ffprobe
semodule -i my-ffprobe.pp

I am now able to view my movie files through jellyfin. FINALLY!

Return to “Pidora / Fedora”