Adrian1040 0 Posted December 3, 2020 Posted December 3, 2020 Hello, After working OK for a while, the conversion is no longer finishing, getting stuck in "Ready to transfer" using the stable version 4.5.2.0 and the beta 4.6.0.6. Device Raspberry Pi4. I use options to Replacing original files, Mobile, Original quality. The process is converting OK, the mp4 is in the Temporary file path, it copies it to the destination folder next to the .mkv (same name but .mp4) and then stops without effacing the .mkv and the temporary files. The error i get in the debug log is: Access to the path is denied. 2020-12-03 02:05:15.704 Info Main: Application path: /opt/emby-server/system/EmbyServer.dll 2020-12-03 02:05:16.433 Info Main: Emby Command line: /opt/emby-server/system/EmbyServer.dll -programdata /var/lib/emby -ffdetect /opt/emby-server/bin/ffdetect -ffmpeg /opt/emby-server/bin/ffmpeg -ffprobe /opt/emby-server/bin/ffprobe -restartexitcode 3 -updatepackage emby-server-deb_{version}_armhf.deb Operating system: Linux version 5.4.72-v7l+ (dom@buildbot) (gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04)) #1356 SMP Thu Oct 22 13:57:51 BST 2020 Framework: .NET Core 3.1.7 OS/Process: arm/arm Runtime: opt/emby-server/system/System.Private.CoreLib.dll Processor count: 4 Data path: /var/lib/emby Application path: /opt/emby-server/system 2020-12-03 02:05:16.560 Info App: Application version: 4.6.0.6 *************************** 2020-12-03 18:00:54.407 Debug App: Sending /media/pi/1TBDISK/42/5542/11bdc4ea-9afc-45df-b45a-b8f3ce7c7d16.mp4 to Emby Media Converter. Remote path: TV/Altered Carbon/Season 1/In A Lonely Place/Altered Carbon - S01E03 - In A Lonely Place.mp4 2020-12-03 18:00:54.408 Info App: Emby Media Converter copying file from /media/pi/1TBDISK/42/5542/11bdc4ea-9afc-45df-b45a-b8f3ce7c7d16.mp4 to /media/pi/Movies/movies/TV Shows/Altered Carbon (2018)/Season 1/Altered Carbon - S01E03 - In A Lonely Place.mp4 2020-12-03 18:01:55.800 Error App: Error transferring sync job file *** Error Report *** Version: 4.6.0.6 Command line: /opt/emby-server/system/EmbyServer.dll -programdata /var/lib/emby -ffdetect /opt/emby-server/bin/ffdetect -ffmpeg /opt/emby-server/bin/ffmpeg -ffprobe /opt/emby-server/bin/ffprobe -restartexitcode 3 -updatepackage emby-server-deb_{version}_armhf.deb Operating system: Linux version 5.4.72-v7l+ (dom@buildbot) (gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04)) #1356 SMP Thu Oct 22 13:57:51 BST 2020 Framework: .NET Core 3.1.7 OS/Process: arm/arm Runtime: opt/emby-server/system/System.Private.CoreLib.dll Processor count: 4 Data path: /var/lib/emby Application path: /opt/emby-server/system System.UnauthorizedAccessException: System.UnauthorizedAccessException: Access to the path is denied. ---> System.IO.IOException: Operation not permitted --- End of inner exception stack trace --- at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirectory, Func`2 errorRewriter) at Interop.CheckIo(Int64 result, String path, Boolean isDirectory, Func`2 errorRewriter) at System.IO.FileSystem.CopyFile(String sourceFullPath, String destFullPath, Boolean overwrite) at System.IO.File.Copy(String sourceFileName, String destFileName, Boolean overwrite) at Emby.Server.Implementations.IO.ManagedFileSystem.CopyFile(String source, String target, Boolean overwrite) at Emby.Server.Sync.ConvertSyncProvider.SendFile(SyncJob job, String originalMediaPath, String inputPath, Boolean isMedia, String[] pathParts, SyncTarget target, IProgress`1 progress, CancellationToken cancellationToken) at Emby.Server.Sync.MediaSync.SendFile(SyncJob job, String originalMediaPath, IServerSyncProvider provider, String inputPath, Boolean isMedia, String[] pathParts, SyncTarget target, SyncOptions options, IProgress`1 progress, CancellationToken cancellationToken) at Emby.Server.Sync.MediaSync.GetItem(IServerSyncProvider provider, SyncTarget target, SyncJobItem jobItem, IProgress`1 progress, CancellationToken cancellationToken) Source: System.IO.FileSystem TargetSite: Void ThrowExceptionForIoErrno(ErrorInfo, System.String, Boolean, System.Func`2[Interop+ErrorInfo,Interop+ErrorInfo]) InnerException: System.IO.IOException: Operation not permitted Source: TargetSite: I don't understand why the acces is denied all of a sudden. root@raspberrypi:/media/pi# namei -l /media/pi/Movies/movies/TV\ Shows/Altered\ Carbon\ \(2018\)/Season\ 1/Altered\ Carbon\ -\ S01E03\ -\ In\ A\ Lonely\ Place.mkv f: /media/pi/Movies/movies/TV Shows/Altered Carbon (2018)/Season 1/Altered Carbon - S01E03 - In A Lonely Place.mkv drwxr-xr-x root root / drwxrwxrwx root root media drwxrwxrwx root root pi drwxrwxrwx pi pi Movies drwxrwxrwx pi pi movies drwxrwxrwx pi pi TV Shows drwxrwxrwx pi pi Altered Carbon (2018) drwxrwxrwx pi pi Season 1 -rwxrwxrwx pi pi Altered Carbon - S01E03 - In A Lonely Place.mkv ********************* root@raspberrypi:/media/pi# sudo blkid /dev/sda2: LABEL="Movies" UUID="E282278882275FF1" TYPE="ntfs" PTTYPE="atari" PARTLABEL="Basic data partition" PARTUUID="cacb2cd0-0f8f-42e5-a6b4-0c01c2a62516" (Media disk)/dev/sdc1: LABEL="1TBDISK" UUID="d2ea0a24-5576-6555-3c93-d4eefbf80771" TYPE="ext4" PARTUUID="703f7968-db00-94db-ea57-f6d5b396a5c1" (Temporary location for conversion) ********************* root@raspberrypi:/media/pi# mount /dev/sda2 on /media/pi/Movies type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096,uhelper=udisks2) /dev/sdc1 on /media/pi/1TBDISK type ext4 (rw,nosuid,nodev,relatime,uhelper=udisks2) The whole path is 777 to the file, the server is saving media and .nfo in the same folder as the media OK, if I delete a movie it deletes it OK from the disk. Also, in the temporay location, it is able to write OK. If I remove the conversion, it deletes OK the temporary folder and all files within. Thank you, Adrian
Adrian1040 0 Posted December 4, 2020 Author Posted December 4, 2020 (edited) I just tested specifically for this file. I made a copy somewhere else and then I deleted the movie from the media library. Emby deleted the files and folder with no issue. Then I put it back and added it to the library. I identified it with another movie, Emby changed the metadata and pictures OK. Clearly Emby has access to write, delete to the media folder. Can you please check if there is something wrong with the call the conversion transferring is doing in order to replace the file? Edited December 7, 2020 by Adrian1040
Adrian1040 0 Posted December 8, 2020 Author Posted December 8, 2020 Is there anything I can do to troubleshoot the issue? Any lead would be appreciated.
Solution Q-Droid 989 Posted December 8, 2020 Solution Posted December 8, 2020 It may have something to do with your media volume being a FUSE mounted NTFS filesystem. Permissions are different between Linux and Windows, they don't align the same. Then there's the ownership of pi but don't know the Emby runtime user.
Adrian1040 0 Posted December 9, 2020 Author Posted December 9, 2020 It was indeed a question of rights, in order to complete the conversion, the Emby server needs ownership rights on the media folders: I disabled automount of the GUI (which was doing a wrong job for this case) and mounted via fstab: UUID=E282278882275FF1 /media/pi/Movies ntfs uid=999,gid=994,defaults,auto,users,allow_other,rw,nofail,umask=000 0 0 999 is the emby user and 994 is emby group All works perfect. As I mentioned before, except the final transfer of conversion, everything else was working fine without the emby ownership. I might suggest to not use a system call that requires ownership and use the same types of calls used during normal media deletion, subtitle/banners replacement etc.
Q-Droid 989 Posted December 9, 2020 Posted December 9, 2020 Emby doesn't require ownership to complete those operations. It needs for the OS to allow those operations by applications. Your configuration adds layers in the OS that must be correct in order for the applications to run as expected. Using FUSE and NTFS (a non-native filesystem) but not having the proper access is what kept the Emby server from running correctly. It's good you found one way to correct the issue and it's working now.
widget100 8 Posted December 11, 2020 Posted December 11, 2020 (edited) *deleted* Edited December 12, 2020 by widget100
Luke 42078 Posted December 29, 2020 Posted December 29, 2020 @Adrian1040 are you still having an issue with this?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now