Trouble with permissions in Emby container

I have been running the Emby container for a while with great success, I really appreciate the baked-in hardware acceleration support. I have been running this on unRaid well with unRaid 3.9 for a long time, after a server restart the container would not start, and with unRaid 3.10 released I opted to upgrade. After the unRaid upgrade, my Emby container now starts OK but I can’t log in.When looking at the emby logs inside the container I see multiple errors related to permissions.

Error examples:

2022-07-09 17:31:46.457 Error App: Error checking for application updates.
	*** Error Report ***
	Version: 4.7.5.0
	Command line: /app/emby/EmbyServer.dll -programdata /config -ffdetect /app/emby/ffdetect -ffmpeg /app/emby/ffmpeg -ffprobe /app/emby/ffprobe -restartexitcode 3
	Operating system: Linux version 5.15.46-Unraid (root@Develop) (gcc (GCC) 11.2.0, GNU ld version 2.37-slack15) #1 SMP Fri Jun 10 11:08:41 PDT 2022
	Framework: .NET 6.0.2
	OS/Process: x64/x64
	Runtime: app/emby/System.Private.CoreLib.dll
	Processor count: 4
	Data path: /config
	Application path: /app/emby
	System.UnauthorizedAccessException: System.UnauthorizedAccessException: Access to the path '/config/cache/httpclient/0fb243ded9649ae6d18059c674a4ae00' is denied.
	 ---> System.IO.IOException: Permission denied
	   --- End of inner exception stack trace ---
	   at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirectory, Func`2 errorRewriter)
	   at Interop.CheckIo(Error error, String path, Boolean isDirectory, Func`2 errorRewriter)
	   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String path, OpenFlags flags, Int32 mode)
	   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
	   at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
	   at System.IO.Strategies.FileStreamHelpers.ChooseStrategy(FileStream fileStream, String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, Int64 preallocationSize)
	   at System.IO.FileStream..ctor(String path, FileStreamOptions options)
	   at Emby.Server.Implementations.IO.ManagedFileSystem.GetFileStream(String path, FileOpenMode mode, FileAccessMode access, FileShareMode share, Int32 bufferSize, FileOpenOptions fileOpenOptions, Int64 preAllocationSize)
	   at Emby.Server.Implementations.IO.ManagedFileSystem.GetFileStream(String path, FileOpenMode mode, FileAccessMode access, FileShareMode share, FileOpenOptions fileOpenOptions, Int64 preAllocationSize)
	   at Emby.Server.Implementations.IO.ManagedFileSystem.GetFileStream(String path, FileOpenMode mode, FileAccessMode access, FileShareMode share, FileOpenOptions fileOpenOptions)
	   at Emby.Server.Implementations.HttpClientManager.CoreHttpClientManager.CacheResponse(HttpResponseInfo response, String responseCachePath)
	   at Emby.Server.Implementations.HttpClientManager.CoreHttpClientManager.SendAsync(HttpRequestOptions options, String httpMethod)
	   at MediaBrowser.Common.Updates.GithubUpdater.CheckForUpdateResult(String organzation, String repository, Version minVersion, PackageVersionClass updateLevel, String assetFilename, String packageName, String targetFilename, TimeSpan cacheLength, CancellationToken cancellationToken)
	   at Emby.Server.Implementations.ApplicationHost.CheckForApplicationUpdate(CancellationToken cancellationToken, IProgress`1 progress)
	   at Emby.Server.Implementations.ScheduledTasks.SystemUpdateTask.Execute(CancellationToken cancellationToken, IProgress`1 progress)
	Source: System.Private.CoreLib
	TargetSite: Void ThrowExceptionForIoErrno(ErrorInfo, System.String, Boolean, System.Func`2[Interop+ErrorInfo,Interop+ErrorInfo])
	InnerException: System.IO.IOException: Permission denied
	Source: 
	TargetSite:

2022-07-09 17:31:48.361 Error PortMapper: Error creating port map
	*** Error Report ***
	Version: 4.7.5.0
	Command line: /app/emby/EmbyServer.dll -programdata /config -ffdetect /app/emby/ffdetect -ffmpeg /app/emby/ffmpeg -ffprobe /app/emby/ffprobe -restartexitcode 3
	Operating system: Linux version 5.15.46-Unraid (root@Develop) (gcc (GCC) 11.2.0, GNU ld version 2.37-slack15) #1 SMP Fri Jun 10 11:08:41 PDT 2022
	Framework: .NET 6.0.2
	OS/Process: x64/x64
	Runtime: app/emby/System.Private.CoreLib.dll
	Processor count: 4
	Data path: /config
	Application path: /app/emby
	MediaBrowser.Model.Net.HttpException: MediaBrowser.Model.Net.HttpException: <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><s:Fault><faultcode>s:Client</faultcode><faultstring>UPnPError</faultstring><detail><UPnPError xmlns="urn:schemas-upnp-org:control-1-0"><errorCode>718</errorCode><errorDescription>ConflictInMappingEntry</errorDescription></UPnPError></detail></s:Fault></s:Body></s:Envelope>
	   at Emby.Server.Implementations.HttpClientManager.CoreHttpClientManager.SendAsyncInternal(HttpRequestOptions options, String httpMethod)
	   at Emby.Server.Implementations.HttpClientManager.CoreHttpClientManager.SendAsync(HttpRequestOptions options, String httpMethod)
	   at Mono.Nat.Upnp.UpnpNatDevice.CreatePortMapInternal(Mapping mapping, CancellationToken cancellationToken)
	   at Mono.Nat.Upnp.UpnpNatDevice.CreatePortMap(Mapping mapping, CancellationToken cancellationToken)
	   at Emby.PortMapper.ExternalPortForwarding.CreateRules(INatDevice device, CancellationToken cancellationToken)
	Source: Emby.Server.Implementations
	TargetSite: Void MoveNext()
	
2022-07-09 17:32:01.293 Error Server: Error processing request
	*** Error Report ***
	Version: 4.7.5.0
	Command line: /app/emby/EmbyServer.dll -programdata /config -ffdetect /app/emby/ffdetect -ffmpeg /app/emby/ffmpeg -ffprobe /app/emby/ffprobe -restartexitcode 3
	Operating system: Linux version 5.15.46-Unraid (root@Develop) (gcc (GCC) 11.2.0, GNU ld version 2.37-slack15) #1 SMP Fri Jun 10 11:08:41 PDT 2022
	Framework: .NET 6.0.2
	OS/Process: x64/x64
	Runtime: app/emby/System.Private.CoreLib.dll
	Processor count: 4
	Data path: /config
	Application path: /app/emby
	SQLitePCL.pretty.SQLiteException: ReadOnly: attempt to write a readonly database
	SQLitePCL.pretty.SQLiteException: Exception of type 'SQLitePCL.pretty.SQLiteException' was thrown.
	   at SQLitePCL.pretty.SQLiteException.CheckOk(sqlite3 db, Int32 rc)
	   at SQLitePCL.pretty.StatementImpl.MoveNext()
	   at Emby.Server.Implementations.Security.AuthenticationRepository.Update(AuthenticationInfo info, Boolean updateDeviceProperties)
	   at Emby.Server.Implementations.HttpServer.Security.AuthorizationContext.GetAuthorization(IRequest httpReq)
	   at Emby.Server.Implementations.HttpServer.Security.AuthorizationContext.GetAuthorizationInfo(IRequest requestContext)
	   at Emby.Server.Implementations.HttpServer.Security.AuthService.Authenticate(IRequest request, IAuthenticationAttributes authAttribtues, CancellationToken cancellationToken)
	   at Emby.Server.Implementations.HttpServer.HttpListenerHost.ApplyRequestFilters(IRequest req, IResponse res, Object requestDto, CancellationToken cancellationToken)
	   at Emby.Server.Implementations.Services.ServiceHandler.ProcessRequestAsync(HttpListenerHost appHost, IRequest httpReq, IResponse httpRes, RestPath restPath, String responseContentType, CancellationToken cancellationToken)
	   at Emby.Server.Implementations.HttpServer.HttpListenerHost.RequestHandler(IRequest httpReq, ReadOnlyMemory`1 urlString, ReadOnlyMemory`1 localPath, CancellationToken cancellationToken)
	Source: SQLitePCL.pretty
	TargetSite: Void CheckOk(SQLitePCLEx.sqlite3, Int32)

I am not a docker expert but these errors make me think something about the permissions inside the docker container or how unRaid is running it are now screwed up. FWIW other unRaid containers seem to be running fine and the errors inside the Emby container make me want to start fixing it there. But it could be some issue with unRaid…

Any ideas on how to fix this?