Jellyfin Forum
SOLVED: Error writing images and NFO to SMB share - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: Troubleshooting (https://forum.jellyfin.org/f-troubleshooting)
+--- Thread: SOLVED: Error writing images and NFO to SMB share (/t-solved-error-writing-images-and-nfo-to-smb-share)



Error writing images and NFO to SMB share - Patio6573 - 2024-12-05

Setup:
Box 1: Proxmox --> Debian12 VM, no GUI --> Jellyfin 10.9.11
Box 2: Truenas Scale --> SMB share "jellyfin-library"

My notes show I used the following commands in the Debian VM to mount the network library location.
Code:
#make mounting point on server
mkdir /mnt/jellyfin-library

#create fstab entry
nano /etc/fstab
//192.168.1.114/jellyfin-library /mnt/jellyfin-library cifs credentials=/root/.jellyfin-library-credentials,_netdev 0 0

Problem:
I get NFO and artwork related errors for every movie/show/episode in my library (1000+). I didn't notice the issue until I went looking for NFO files, since the artwork is successfully saving to the /var/... folder. So I did the kind of scan that replaces all metadata and artwork, and creates NFO files, and was dumbfounded when the log file was full of these access denied errors. Then I spent the last 3 evenings searching for keywords without luck.
Code:
[ERR] UnauthorizedAccessException - Access to path "/mnt/jellyfin-library/movies/some-movie (YYYY)/clearart.png" is denied. Will retry saving to "/var/lib/jellyfin/metadata/library/c6/c6f4ede0a7ffccb56743f86b575e8a60/clearart.png"
[ERR] Error in metadata saver
System.UnauthorizedAccessException: Access to the path '/mnt/jellyfin-library/movies/some-movie (YYYY)/movie.nfo' is denied.
---> System.IO.IOException: Permission denied
  --- End of inner exception stack trace ---
  at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirError)
  at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, UnixFileMode openPermissions, Int64& fileLength, UnixFileMode& filePermissions, Boolean failForSymlink, Boolean& wasSymlink, Func`4 createOpenException)
  at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
  at System.IO.FileStream..ctor(String path, FileStreamOptions options)
  at MediaBrowser.XbmcMetadata.Savers.BaseNfoSaver.SaveToFileAsync(Stream stream, String path)
  at MediaBrowser.XbmcMetadata.Savers.BaseNfoSaver.SaveAsync(BaseItem item, CancellationToken cancellationToken)
  at MediaBrowser.Providers.Manager.ProviderManager.SaveMetadataAsync(BaseItem item, ItemUpdateType updateType, IEnumerable`1 savers)
Jellyfin can read everything just fine. All my media shows up in the libraries as expected, new media is visible on client devices immediately after running a scan. The issue is limited to Jellyfin writing files to the SMB share.

Expectation:
Jellyfin starts writing artwork and NFO files to the SMB share.

I can run the following command from the debian command line and manually create a NFO file without issue:
Code:
root@debian-jellyfin:/mnt/jellyfin-library/movies/some-movie (YYYY)/movie.nfo
...so I think my permissions are setup correctly on the TrueNAS side of things.
I also tried a temporary Jellyfin installation on Windows and it worked OK, so it's definitely specific to my Linux installation. I am 99% sure I've overlooked something basic, but I'm at a point where I need some guided help.


RE: Error writing images and NFO to SMB share - TheDreadPirate - 2024-12-05

Try adding "noperm" to the SMB options in /etc/fstab.

Code:
//192.168.1.114/jellyfin-library /mnt/jellyfin-library cifs credentials=/root/.jellyfin-library-credentials,_netdev,noperm 0 0



RE: Error writing images and NFO to SMB share - Patio6573 - 2024-12-05

(2024-12-05, 01:59 PM)TheDreadPirate Wrote: Try adding "noperm" to the SMB options in /etc/fstab.

Code:
//192.168.1.114/jellyfin-library /mnt/jellyfin-library cifs credentials=/root/.jellyfin-library-credentials,_netdev,noperm 0 0

That did the trick! Thank-you very much.