Jellyfin Forum
SOLVED: ffmpeg permission issue - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: Troubleshooting (https://forum.jellyfin.org/f-troubleshooting)
+---- Forum: Media Scanning & Identification (https://forum.jellyfin.org/f-media-scanning-identification)
+---- Thread: SOLVED: ffmpeg permission issue (/t-solved-ffmpeg-permission-issue)



ffmpeg permission issue - DogChainsaw - 2024-08-20

I tried changing the user and group but nothing worked. I keep getting permission issues with new files

[LOG]

{"Protocol":0,"Id":"5bdff9908e3a45208c25e86f41fa350a","Path":"/mnt/a04be9b4-8742-46fd-9f67-efc43a67b9fb/media/tv/anime/Fairy Tail - 100 Years Quest [tvdb-410031]/Season 01/Fairy Tail 100 Years Quest (2024) - S01E07 - 007 - TBA [HDTV-1080p][8bit][x264][AAC 2.0][JA]-SubsPlease.mkv","EncoderPath":null,"EncoderProtocol":null,"Type":0,"Container":"mkv","Size":null,"Name":"Fairy Tail 100 Years Quest (2024) - S01E07 - 007 - TBA [HDTV-1080p][8bit][x264][AAC 2.0][JA]-SubsPlease","IsRemote":false,"ETag":"160e8d7451d32aefb7af963d1c7c1a2a","RunTimeTicks":null,"ReadAtNativeFramerate":false,"IgnoreDts":false,"IgnoreIndex":false,"GenPtsInput":false,"SupportsTranscoding":true,"SupportsDirectStream":true,"SupportsDirectPlay":true,"IsInfiniteStream":false,"RequiresOpening":false,"OpenToken":null,"RequiresClosing":false,"LiveStreamId":null,"BufferMs":null,"RequiresLooping":false,"SupportsProbing":true,"VideoType":0,"IsoType":null,"Video3DFormat":null,"MediaStreams":[],"MediaAttachments":[],"Formats":[],"Bitrate":null,"Timestamp":null,"RequiredHttpHeaders":{},"TranscodingUrl":null,"TranscodingSubProtocol":0,"TranscodingContainer":null,"AnalyzeDurationMs":null,"DefaultAudioStreamIndex":null,"DefaultSubtitleStreamIndex":null}

/usr/lib/jellyfin-ffmpeg/ffmpeg -analyzeduration 200M -probesize 1G -init_hw_device drm=drConfused-facedev/dri/renderD128 -init_hw_device vaapi=va@dr -init_hw_device vulkan=vk@dr -filter_hw_device vk -noautorotate -i file:"/mnt/a04be9b4-8742-46fd-9f67-efc43a67b9fb/media/tv/anime/Fairy Tail - 100 Years Quest [tvdb-410031]/Season 01/Fairy Tail 100 Years Quest (2024) - S01E07 - 007 - TBA [HDTV-1080p][8bit][x264][AAC 2.0][JA]-SubsPlease.mkv" -map_metadata -1 -map_chapters -1 -threads 0 -sn  -copyts -avoid_negative_ts disabled -max_muxing_queue_size 2048 -f hls -max_delay 5000000 -hls_time 3 -hls_segment_type fmp4 -hls_fmp4_init_filename "99562ba35e22a49e0f8dda2cea314d4c-1.mp4" -start_number 0 -hls_base_url "hls/99562ba35e22a49e0f8dda2cea314d4c/" -hls_segment_filename "/var/cache/jellyfin/transcodes/99562ba35e22a49e0f8dda2cea314d4c%d.mp4" -hls_playlist_type event -hls_list_size 0 -y "/var/cache/jellyfin/transcodes/99562ba35e22a49e0f8dda2cea314d4c.m3u8"


ffmpeg version 6.0.1-Jellyfin Copyright © 2000-2023 the FFmpeg developers
  built with gcc 11 (Ubuntu 11.4.0-1ubuntu1~22.04)
  configuration: --prefix=/usr/lib/jellyfin-ffmpeg --target-os=linux --extra-version=Jellyfin --disable-doc --disable-ffplay --disable-ptx-compression --disable-static --disable-libxcb --disable-sdl2 --disable-xlib --enable-lto --enable-gpl --enable-version3 --enable-shared --enable-gmp --enable-gnutls --enable-chromaprint --enable-opencl --enable-libdrm --enable-libxml2 --enable-libass --enable-libfreetype --enable-libfribidi --enable-libfontconfig --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libopenmpt --enable-libdav1d --enable-libsvtav1 --enable-libwebp --enable-libvpx --enable-libx264 --enable-libx265 --enable-libzvbi --enable-libzimg --enable-libfdk-aac --arch=amd64 --enable-libshaderc --enable-libplacebo --enable-vulkan --enable-vaapi --enable-amf --enable-libvpl --enable-ffnvcodec --enable-cuda --enable-cuda-llvm --enable-cuvid --enable-nvdec --enable-nvenc
  libavutil      58.  2.100 / 58.  2.100
  libavcodec    60.  3.100 / 60.  3.100
  libavformat    60.  3.100 / 60.  3.100
  libavdevice    60.  1.100 / 60.  1.100
  libavfilter    9.  3.100 /  9.  3.100
  libswscale      7.  1.100 /  7.  1.100
  libswresample  4. 10.100 /  4. 10.100
  libpostproc    57.  1.100 / 57.  1.100
fileConfused-facemnt/a04be9b4-8742-46fd-9f67-efc43a67b9fb/media/tv/anime/Fairy Tail - 100 Years Quest [tvdb-410031]/Season 01/Fairy Tail 100 Years Quest (2024) - S01E07 - 007 - TBA [HDTV-1080p][8bit][x264][AAC 2.0][JA]-SubsPlease.mkv: Permission denied


RE: ffmpeg permission issue - TheDreadPirate - 2024-08-20

It looks like a plain file permission issue. Make sure that the permissions are sufficient on every part of that path to allow jellyfin to read that file.

Run this command and share the output. Just copy and paste.

Code:
sudo ls -ld /mnt /mnt/a04be9b4-8742-46fd-9f67-efc43a67b9fb /mnt/a04be9b4-8742-46fd-9f67-efc43a67b9fb/media /mnt/a04be9b4-8742-46fd-9f67-efc43a67b9fb/media/tv /mnt/a04be9b4-8742-46fd-9f67-efc43a67b9fb/media/tv/anime /mnt/a04be9b4-8742-46fd-9f67-efc43a67b9fb/media/tv/anime/"Fairy Tail - 100 Years Quest [tvdb-410031]" /mnt/a04be9b4-8742-46fd-9f67-efc43a67b9fb/media/tc/anime/"Fairy Tail - 100 Years Quest [tvdb-410031]"/"Season 01"
sudo ls -l "/mnt/a04be9b4-8742-46fd-9f67-efc43a67b9fb/media/tv/anime/Fairy Tail - 100 Years Quest [tvdb-410031]/Season 01/Fairy Tail 100 Years Quest (2024) - S01E07 - 007 - TBA [HDTV-1080p][8bit][x264][AAC 2.0][JA]-SubsPlease.mkv"



RE: ffmpeg permission issue - DogChainsaw - 2024-08-21

ls: cannot access '/mnt/a04be9b4-8742-46fd-9f67-efc43a67b9fb/media/tc/anime/Fairy Tail - 100 Years Quest [tvdb-410031]/Season 01': No such file or directory
drwxrwxr-x 3 jermaine jermaine 4096 Aug 10 01:51 /mnt
drwxrwx--- 7 jermaine jermaine 4096 Aug 9 20:21 /mnt/a04be9b4-8742-46fd-9f67-efc43a67b9fb
drwxrwx--- 6 jermaine jermaine 4096 Aug 9 22:25 /mnt/a04be9b4-8742-46fd-9f67-efc43a67b9fb/media
drwxrwx--- 5 jermaine jermaine 4096 Oct 20 2023 /mnt/a04be9b4-8742-46fd-9f67-efc43a67b9fb/media/tv
drwxrwx--- 122 jermaine jermaine 12288 Aug 14 02:00 /mnt/a04be9b4-8742-46fd-9f67-efc43a67b9fb/media/tv/anime
drwxrwx--- 3 jermaine jermaine 4096 Aug 11 18:14 '/mnt/a04be9b4-8742-46fd-9f67-efc43a67b9fb/media/tv/anime/Fairy Tail - 100 Years Quest [tvdb-410031]'






-rw------- 1 jermaine jermaine 1454644287 Aug 18 08:40 '/mnt/a04be9b4-8742-46fd-9f67-efc43a67b9fb/media/tv/anime/Fairy Tail - 100 Years Quest [tvdb-410031]/Season 01/Fairy Tail 100 Years Quest (2024) - S01E07 - 007 - TBA [HDTV-1080p][8bit][x264][AAC 2.0][JA]-SubsPlease.mkv'


RE: ffmpeg permission issue - nyanmisaka - 2024-08-21

Some Bittorrent software will lock the file when reseeding, making ffmpeg unable to read it.


RE: ffmpeg permission issue - TheDreadPirate - 2024-08-21

The jellyfin user doesn't have permissions to this folder nor any of the child folders.

drwxrwx--- 7 jermaine jermaine 4096 Aug 9 20:21 /mnt/a04be9b4-8742-46fd-9f67-efc43a67b9fb

Run this command

Code:
sudo chmod o+rx -R /mnt/a04be9b4-8742-46fd-9f67-efc43a67b9fb

Your other option is to change the group owner to jellyfin.

Code:
sudo chgrp -R jellyfin /mnt/a04be9b4-8742-46fd-9f67-efc43a67b9fb

And for the individual files, only your user can read them.

Code:
sudo find /mnt/a04be9b4-8742-46fd-9f67-efc43a67b9fb -type f -exec chmod og+r {} \;



RE: ffmpeg permission issue - DogChainsaw - 2024-08-22

Its working now thank you!