Jump to content

nfo Metadata saver: Permission denied


chrischalfin
Go to solution Solved by Happy2Play,

Recommended Posts

chrischalfin

Hi,

I am having this problem for a while now and tried to find the solution in former topics facing with file/folder permission issues in Linux. I think I tried a lot, but still without success.

What am I trying to do?
I want to save all metadata changes, made within emby, saved as an album.nfo file in the album-folder. I just want to make sure, that all changes I made are permanently saved and can be exported when necessary.

My library setup
My music is physically stored on a network drive, which is configured as a samba share. I mount this share with a dietpi-raspberry and emby is running on that raspberry. I checked file permissions, the mount has owner and group emby. So that should work?

What did I do so far?
I activated nfo as metadata reader and safer in the library. I change the album genre in emby and save it. My expectation is, that this change would reflect in an album.nfo file? But nothing happens.

Log Output
This is what I get:

2022-12-23 06:23:45.109 Error ProviderManager: Error in metadata saver
	*** Error Report ***
	Version: 4.7.11.0
	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.10.103-v7+ (dom@buildbot) (arm-linux-gnueabihf-gcc-8 (Ubuntu/Linaro 8.4.0-3ubuntu1) 8.4.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #152
	Framework: .NET 6.0.8
	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 '/mnt/MusicLibrary/iTunes/Queen/Jazz/album.nfo' is denied.
	 ---> System.IO.IOException: Permission denied
	   --- End of inner exception stack trace ---
	   at System.IO.RandomAccess.WriteAtOffset(SafeFileHandle handle, ReadOnlySpan`1 buffer, Int64 fileOffset)
	   at System.IO.Strategies.BufferedFileStreamStrategy.FlushWrite()
	   at System.IO.Strategies.BufferedFileStreamStrategy.Dispose(Boolean disposing)
	   at System.IO.Stream.Dispose()
	   at NfoMetadata.Savers.BaseNfoSaver.SaveToFile(Stream stream, String path, LibraryOptions libraryOptions, CancellationToken cancellationToken)
	   at NfoMetadata.Savers.BaseNfoSaver.Save(BaseItem item, LibraryOptions libraryOptions, CancellationToken cancellationToken)
	   at Emby.Providers.Manager.ProviderManager.SaveMetadata(BaseItem item, LibraryOptions libraryOptions, ItemUpdateType updateType, IMetadataSaver[] savers, CancellationToken cancellationToken)
	Source: System.Private.CoreLib
	TargetSite: Void WriteAtOffset(Microsoft.Win32.SafeHandles.SafeFileHandle, System.ReadOnlySpan`1[System.Byte], Int64)
	InnerException: System.IO.IOException: Permission denied
	Source: 
	TargetSite: 

 

My question:
What could possibly still go wrong? I know everything looks like a classic linux permission problem, I just already tried many configurations with no luck. Is there another cause for this problem? Or am I missing something else?

I hope you can help me 😀 Thank you!

Link to comment
Share on other sites

HI there, it looks like Emby Server is being denied write access by your file system. Have you taken a look at this?

 

Link to comment
Share on other sites

chrischalfin

Thank you for your reply! I already found that article and followed the instructions. Unfortunatelly It didn´t solve my problem.

My current permission status for my music library is the following:

drwxr-xr-x  2 emby emby  0 Aug  8 20:50 MusicLibrary

The user emby should have write permission. Maybe it´s important to know, that the folder is mounted via samba share and the following entry in fstab:

//192.168.178.XX/MusicLibrarySamba /mnt/MusicLibrary cifs cred=/var/lib/dietpi/dietpi-drive_manager/mnt-MusicLibrary.cred,iocharset=utf8,uid=emby,gid=emby,file_mode=0755,dir_mode=0755,vers=3.1.1,nofail

The corresponding configuration in smb.conf is the following:

[MusicLibrarySamba]
path=/media/myCloudDrive/music
writeable=yes
valid users = SambaUser
force user = sambauser
force group = sambauser

The music folders permission settings:

drwxr-xr-x 1 sambauser sambauser  144  8. Aug 21:50 music

One possibility is, that maybe the different user names emby and sambauser might cause the problem?

Link to comment
Share on other sites

Q-Droid
On 12/28/2022 at 4:15 PM, Happy2Play said:

Possible noblr issue?

I thought that would have been fixed in .Net 6. Go figure.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...