Access denied with sonarr

Creating a bug report/issue

x I have searched the existing open and closed issues

I did perform a thoroughly search and found a few posts regarding the same subject, but no solution worked for me so far.

I tried a few times installl Sonarr, install-uninstall-reboot just in case, and the same error appears.

“systemd[1]: sonarr.service: Main process exited, code=exited, status=143/n/a “

It is a permission problem on the sonarr user data space.

“Aug 07 19:32:09 rpi2dpi Sonarr[2520]: [v4.0.15.2941] NzbDrone.Common.Exceptions.SonarrStartupException: Sonarr failed to

start: Cannot create AppFolder, Access to the path /mnt/dietpi_userdata/sonarr is denied “

I already tried to chmod 755 the folder /mnt/dietpi_userdata/sonarr and my last try was chmod 775 /home/sonarr.

If I’m not mistake the first path ( /mnt/dietpi_userdata/sonarr ) is a link to the second (/mnt/dietpi_userdata/sonarr).

And I just can’t figure out what else can I do to solve this…

Required Information

  • DietPi version
    G_DIETPI_VERSION_CORE=9
    G_DIETPI_VERSION_SUB=15
    G_DIETPI_VERSION_RC=2
    G_GITBRANCH=‘master’
    G_GITOWNER=‘MichaIng’

  • Distro version = bookworm 0

  • Kernel version = Linux rpi2dpi 6.12.34+rpt-rpi-v7 #1 SMP Raspbian 1:6.12.34-1+rpt1~bookworm (2025-06-26) armv7l GNU/Linux

  • Architecture = armhf

  • SBC model = RPi 2 Model B (armv7l)

    Power supply used = 5v 2.1A

Additional Information (if applicable)

  • Software title SONARR
  • Was the software title installed freshly or updated/migrated? freashly installed directly from dietpi-software.
  • Can this issue be replicated on a fresh installation of DietPi? I didn’t try that yet.
  • Bug report ID | 8321356b-faaf-46a8-96f0-844318e2205f

Steps to reproduce

  1. I installed Sonarr using dietpi-software

  2. Running journalctl -u sonarr I got the error [Sonarr failed to

    start: Cannot create AppFolder, Access to the path /mnt/dietpi_userdata/sonarr is denied ] Or something very similar on different lines. It depends of what it tries to do

  3. At the end of log: Aug 07 20:23:06 rpi2dpi Sonarr[6146]: Press enter to exit… Aug 07 20:23:07 rpi2dpi Sonarr[6146]: Non-recoverable failure, waiting for user intervention…

Expected behaviour

Actual behaviour

Extra details

  • I don’t know what else I can say right now…

pls can you restart your system and share the service log afterwards

journalctl -u sonarr

and following in additon

ls -la /mnt/dietpi_userdata/sonarr

Sure:

journalctl -u sonarr

Aug 08 11:40:39 rpi2dpi systemd[1]: Started sonarr.service - Sonarr (DietPi).
Aug 08 11:40:53 rpi2dpi Sonarr[411]: Failed to load dependency, may need an OS update: System.UnauthorizedAccessException: Access to the path '/mnt/dietpi_userdata/sonarr/Sentry/07ADDC43B5669C4F6DB64F2EF2B23B3FEEDFE865' is denied.
Aug 08 11:40:53 rpi2dpi Sonarr[411]:  ---> System.IO.IOException: Permission denied
Aug 08 11:40:53 rpi2dpi Sonarr[411]:    --- End of inner exception stack trace ---
Aug 08 11:40:53 rpi2dpi Sonarr[411]:    at System.IO.FileSystem.CreateDirectory(String fullPath)
Aug 08 11:40:53 rpi2dpi Sonarr[411]:    at System.IO.Directory.CreateDirectory(String path)
Aug 08 11:40:53 rpi2dpi Sonarr[411]:    at Sentry.Internal.FileSystem.CreateDirectory(String path)
Aug 08 11:40:53 rpi2dpi Sonarr[411]:    at Sentry.Internal.Http.CachingTransport.Initialize(Boolean startWorker)
Aug 08 11:40:53 rpi2dpi Sonarr[411]:    at Sentry.Internal.Http.CachingTransport.Create(ITransport innerTransport, SentryOptions options, Boolean startWorker, Boolean failStorage)
Aug 08 11:40:53 rpi2dpi Sonarr[411]:    at Sentry.Internal.SdkComposer.CreateTransport()
Aug 08 11:40:53 rpi2dpi Sonarr[411]:    at Sentry.Internal.SdkComposer.CreateBackgroundWorker()
Aug 08 11:40:53 rpi2dpi Sonarr[411]:    at Sentry.SentryClient..ctor(SentryOptions options, IBackgroundWorker worker, RandomValuesFactory randomValuesFactory, ISessionManager sessionManager)
Aug 08 11:40:53 rpi2dpi Sonarr[411]:    at Sentry.Internal.Hub..ctor(SentryOptions options, ISentryClient client, ISessionManager sessionManager, ISystemClock clock, IInternalScopeManager scopeManager, RandomValuesFactory randomValuesFactory)
Aug 08 11:40:53 rpi2dpi Sonarr[411]:    at Sentry.SentrySdk.InitHub(SentryOptions options)
Aug 08 11:40:53 rpi2dpi Sonarr[411]:    at Sentry.SentrySdk.Init(SentryOptions options)
Aug 08 11:40:53 rpi2dpi Sonarr[411]:    at Sentry.SentrySdk.Init(Action`1 configureOptions)
Aug 08 11:40:53 rpi2dpi Sonarr[411]:    at NzbDrone.Common.Instrumentation.Sentry.SentryTarget..ctor(String dsn, IAppFolderInfo appFolderInfo) in ./Sonarr.Common/Instrumentation/Sentry/SentryTarget.cs:line 102
Aug 08 11:40:53 rpi2dpi Sonarr[411]:    at NzbDrone.Common.Instrumentation.NzbDroneLogger.RegisterSentry(Boolean updateClient, IAppFolderInfo appFolderInfo) in ./Sonarr.Common/Instrumentation/NzbDroneLogger.cs:line 88
Aug 08 11:40:55 rpi2dpi Sonarr[411]: [Info] Bootstrap: Starting Sonarr - /opt/sonarr/Sonarr - Version 4.0.15.2941
Aug 08 11:40:56 rpi2dpi Sonarr[411]: [Info] AppFolderInfo: Data directory is being overridden to [/mnt/dietpi_userdata/sonarr]
Aug 08 11:40:57 rpi2dpi Sonarr[411]: [Debug] Bootstrap: Console selected
Aug 08 11:40:57 rpi2dpi Sonarr[411]: [Info] AppFolderInfo: Data directory is being overridden to [/mnt/dietpi_userdata/sonarr]
Aug 08 11:41:08 rpi2dpi Sonarr[411]: [Info] AppFolderInfo: Data directory is being overridden to [/mnt/dietpi_userdata/sonarr]
Aug 08 11:41:21 rpi2dpi Sonarr[411]: [Error] Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider: An error occurred while reading the key ring.
Aug 08 11:41:21 rpi2dpi Sonarr[411]: [v4.0.15.2941] System.UnauthorizedAccessException: Access to the path '/mnt/dietpi_userdata/sonarr/asp' is denied.
Aug 08 11:41:21 rpi2dpi Sonarr[411]:  ---> System.IO.IOException: Permission denied
Aug 08 11:41:21 rpi2dpi Sonarr[411]:    --- End of inner exception stack trace ---
Aug 08 11:41:21 rpi2dpi Sonarr[411]:    at System.IO.FileSystem.CreateDirectory(String fullPath)
Aug 08 11:41:21 rpi2dpi Sonarr[411]:    at System.IO.DirectoryInfo.Create()
Aug 08 11:41:21 rpi2dpi Sonarr[411]:    at Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository.GetAllElementsCore()+MoveNext()
Aug 08 11:41:21 rpi2dpi Sonarr[411]:    at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
Aug 08 11:41:21 rpi2dpi Sonarr[411]:    at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
Aug 08 11:41:21 rpi2dpi Sonarr[411]:    at Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository.GetAllElements()
Aug 08 11:41:21 rpi2dpi Sonarr[411]:    at Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager.GetAllKeys()
Aug 08 11:41:21 rpi2dpi Sonarr[411]:    at Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider.CreateCacheableKeyRingCore(DateTimeOffset now, IKey keyJustAdded)
Aug 08 11:41:21 rpi2dpi Sonarr[411]:    at Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider.Microsoft.AspNetCore.DataProtection.KeyManagement.Internal.ICacheableKeyRingProvider.GetCacheableKeyRing(DateTimeOffset now)
Aug 08 11:41:21 rpi2dpi Sonarr[411]:    at Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider.GetCurrentKeyRingCore(DateTime utcNow, Boolean forceRefresh)
Aug 08 11:41:24 rpi2dpi Sonarr[411]: [Fatal] Microsoft.AspNetCore.Hosting.Diagnostics: Application startup exception
Aug 08 11:41:24 rpi2dpi Sonarr[411]: [v4.0.15.2941] NzbDrone.Common.Exceptions.SonarrStartupException: Sonarr failed to start: Cannot create AppFolder, Access to the path /mnt/dietpi_userdata/sonarr is denied
Aug 08 11:41:24 rpi2dpi Sonarr[411]:    at NzbDrone.Common.EnvironmentInfo.AppFolderFactory.Register() in ./Sonarr.Common/EnvironmentInfo/AppFolderFactory.cs:line 46
Aug 08 11:41:24 rpi2dpi Sonarr[411]:    at NzbDrone.Host.Startup.Configure(IApplicationBuilder app, IContainer container, IStartupContext startupContext, Lazy`1 mainDatabaseFactory, Lazy`1 logDatabaseFactory, DatabaseTarget dbTarget, ISingleInstancePolicy singleInstancePolicy, InitializeLogger initializeLogger, ReconfigureLogging reconfigureLogging, IAppFolderFactory appFolderFactory, IProvidePidFile pidFileProvider, IConfigFileProvider configFileProvider, IRuntimeInfo runtimeInfo, IFirewallAdapter firewallAdapter, IEventAggregator eventAggregator, SonarrErrorPipeline errorHandler) in ./Sonarr.Host/Startup.cs:line 215
Aug 08 11:41:24 rpi2dpi Sonarr[411]:    at System.RuntimeMethodHandle.InvokeMethod(Object target, Span`1& arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
Aug 08 11:41:24 rpi2dpi Sonarr[411]:    at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
Aug 08 11:41:24 rpi2dpi Sonarr[411]:    at Microsoft.AspNetCore.Hosting.ConfigureBuilder.Invoke(Object instance, IApplicationBuilder builder)
Aug 08 11:41:24 rpi2dpi Sonarr[411]:    at Microsoft.AspNetCore.Hosting.ConfigureBuilder.<>c__DisplayClass4_0.<Build>b__0(IApplicationBuilder builder)
Aug 08 11:41:24 rpi2dpi Sonarr[411]:    at Microsoft.AspNetCore.Hosting.GenericWebHostBuilder.<>c__DisplayClass15_0.<UseStartup>b__1(IApplicationBuilder app)
Aug 08 11:41:24 rpi2dpi Sonarr[411]:    at Microsoft.AspNetCore.Mvc.Filters.MiddlewareFilterBuilderStartupFilter.<>c__DisplayClass0_0.<Configure>g__MiddlewareFilterBuilder|0(IApplicationBuilder builder)
Aug 08 11:41:24 rpi2dpi Sonarr[411]:    at Microsoft.AspNetCore.Hosting.GenericWebHostService.StartAsync(CancellationToken cancellationToken)
Aug 08 11:41:25 rpi2dpi Sonarr[411]: [Fatal] ConsoleApp: EPIC FAIL!
Aug 08 11:41:25 rpi2dpi Sonarr[411]: [v4.0.15.2941] NzbDrone.Common.Exceptions.SonarrStartupException: Sonarr failed to start: Cannot create AppFolder, Access to the path /mnt/dietpi_userdata/sonarr is denied
Aug 08 11:41:25 rpi2dpi Sonarr[411]:    at NzbDrone.Common.EnvironmentInfo.AppFolderFactory.Register() in ./Sonarr.Common/EnvironmentInfo/AppFolderFactory.cs:line 46
Aug 08 11:41:25 rpi2dpi Sonarr[411]:    at NzbDrone.Host.Startup.Configure(IApplicationBuilder app, IContainer container, IStartupContext startupContext, Lazy`1 mainDatabaseFactory, Lazy`1 logDatabaseFactory, DatabaseTarget dbTarget, ISingleInstancePolicy singleInstancePolicy, InitializeLogger initializeLogger, ReconfigureLogging reconfigureLogging, IAppFolderFactory appFolderFactory, IProvidePidFile pidFileProvider, IConfigFileProvider configFileProvider, IRuntimeInfo runtimeInfo, IFirewallAdapter firewallAdapter, IEventAggregator eventAggregator, SonarrErrorPipeline errorHandler) in ./Sonarr.Host/Startup.cs:line 215
Aug 08 11:41:25 rpi2dpi Sonarr[411]:    at System.RuntimeMethodHandle.InvokeMethod(Object target, Span`1& arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
Aug 08 11:41:25 rpi2dpi Sonarr[411]:    at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
Aug 08 11:41:25 rpi2dpi Sonarr[411]:    at Microsoft.AspNetCore.Hosting.ConfigureBuilder.Invoke(Object instance, IApplicationBuilder builder)
Aug 08 11:41:25 rpi2dpi Sonarr[411]:    at Microsoft.AspNetCore.Hosting.ConfigureBuilder.<>c__DisplayClass4_0.<Build>b__0(IApplicationBuilder builder)
Aug 08 11:41:25 rpi2dpi Sonarr[411]:    at Microsoft.AspNetCore.Hosting.GenericWebHostBuilder.<>c__DisplayClass15_0.<UseStartup>b__1(IApplicationBuilder app)
Aug 08 11:41:25 rpi2dpi Sonarr[411]:    at Microsoft.AspNetCore.Mvc.Filters.MiddlewareFilterBuilderStartupFilter.<>c__DisplayClass0_0.<Configure>g__MiddlewareFilterBuilder|0(IApplicationBuilder builder)
Aug 08 11:41:25 rpi2dpi Sonarr[411]:    at Microsoft.AspNetCore.Hosting.GenericWebHostService.StartAsync(CancellationToken cancellationToken)
Aug 08 11:41:25 rpi2dpi Sonarr[411]:    at Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellationToken)
Aug 08 11:41:25 rpi2dpi Sonarr[411]:    at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
Aug 08 11:41:25 rpi2dpi Sonarr[411]:    at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
Aug 08 11:41:25 rpi2dpi Sonarr[411]:    at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.Run(IHost host)
Aug 08 11:41:25 rpi2dpi Sonarr[411]:    at NzbDrone.Host.Bootstrap.Start(String[] args, Action`1 trayCallback) in ./Sonarr.Host/Bootstrap.cs:line 80
Aug 08 11:41:25 rpi2dpi Sonarr[411]:    at NzbDrone.Console.ConsoleApp.Main(String[] args) in ./Sonarr.Console/ConsoleApp.cs:line 45
Aug 08 11:41:25 rpi2dpi Sonarr[411]: Press enter to exit...
Aug 08 11:41:26 rpi2dpi Sonarr[411]: Non-recoverable failure, waiting for user intervention...

and:

tcs@rpi2dpi:~$ ls -la /mnt/dietpi_userdata/sonarr
total 8
drwxrwxr-x  2 sonarr dietpi 4096 Aug  7 14:11 .
drwxr-xr-x 11 dietpi dietpi 4096 Aug  7 14:00 ..
lrwxrwxrwx  1 sonarr dietpi   15 Aug  7 14:11 logs -> /var/log/sonarr
lrwxrwxrwx  1 sonarr dietpi   23 Aug  7 14:11 logs.db -> /var/log/sonarr/logs.db
lrwxrwxrwx  1 sonarr dietpi   27 Aug  7 14:11 logs.db-shm -> /var/log/sonarr/logs.db-shm
lrwxrwxrwx  1 sonarr dietpi   27 Aug  7 14:11 logs.db-wal -> /var/log/sonarr/logs.db-wal

Thankyou so much for your time…

hmm these 2 folders did not exist on your system. But they are part of standard installation. This is from a test install

root@DietPi5:~# ls -la /mnt/dietpi_userdata/sonarr/
total 664
drwxr-xr-x 4 sonarr dietpi   4096 Aug  8 17:43 .
drwxrwxr-x 7 dietpi dietpi   4096 Aug  8 17:43 ..
drwxrwxr-x 3 sonarr dietpi   4096 Aug  8 17:43 Sentry
drwxrwxr-x 2 sonarr dietpi   4096 Aug  8 17:43 asp
-rw-rw-r-- 1 sonarr dietpi    508 Aug  8 17:43 config.xml
lrwxrwxrwx 1 sonarr dietpi     15 Aug  8 17:43 logs -> /var/log/sonarr
lrwxrwxrwx 1 sonarr dietpi     23 Aug  8 17:43 logs.db -> /var/log/sonarr/logs.db
lrwxrwxrwx 1 sonarr dietpi     27 Aug  8 17:43 logs.db-shm -> /var/log/sonarr/logs.db-shm
lrwxrwxrwx 1 sonarr dietpi     27 Aug  8 17:43 logs.db-wal -> /var/log/sonarr/logs.db-wal
-rw-r--r-- 1 sonarr dietpi 364544 Aug  8 17:43 sonarr.db
-rw-r--r-- 1 sonarr dietpi  32768 Aug  8 17:43 sonarr.db-shm
-rw-r--r-- 1 sonarr dietpi 255472 Aug  8 17:43 sonarr.db-wal
-rw-rw-r-- 1 sonarr dietpi      4 Aug  8 17:43 sonarr.pid
root@DietPi5:~#

Was this a new install?

Yes. But I can uninstall, clear everything on that folder and reinstall. Do you think it can work?

hopefully. After uninstall, reboot your system. Usually the whole folder /mnt/dietpi_userdata/sonarr/ should be gone afterwards

Indeed, the folder was removed.
I’ll finish another job and then try to reinstall Sonarr from dietpi-software.
Or should I try manually? I really don’t mind…

pls use our install script. There should be no need to do thinks manually. If the folder still missing afterwards, something wrong with the Sonarr own package (we don’t maintain). This we can check once you tried to install again.

Yeah, something is wrong….

 DietPi-Software
─────────────────────────────────────────────────────
 Step: Install completed

[  OK  ] DietPi-Survey | Purging survey data
[ SUB1 ] DietPi-Services > restart 
[  OK  ] DietPi-Services | restart : sonarr
urbackupsrv.service is not a native service, redirecting to systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install is-enabled urbackupsrv
[  OK  ] DietPi-Services | restart : urbackupsrv
[  OK  ] DietPi-Services | restart : influxdb
[  OK  ] DietPi-Services | restart : grafana-server
[  OK  ] DietPi-Services | restart : docker
[  OK  ] DietPi-Services | restart : cron
tcs@rpi2dpi:~$ ls -la /mnt/dietpi_userdata/sonarr
total 8
drwxr-xr-x  2 sonarr dietpi 4096 Aug  8 13:30 .
drwxr-xr-x 11 dietpi dietpi 4096 Aug  8 13:29 ..
lrwxrwxrwx  1 sonarr dietpi   15 Aug  8 13:30 logs -> /var/log/sonarr
lrwxrwxrwx  1 sonarr dietpi   23 Aug  8 13:30 logs.db -> /var/log/sonarr/logs.db
lrwxrwxrwx  1 sonarr dietpi   27 Aug  8 13:30 logs.db-shm -> /var/log/sonarr/logs.db-shm
lrwxrwxrwx  1 sonarr dietpi   27 Aug  8 13:30 logs.db-wal -> /var/log/sonarr/logs.db-wal

ok the problem seems to be with the dietpi_userdata directory. You are missing the write permission for dietpi group. Did you removed it?

You would need to set it again

chmod 775 /mnt/dietpi_userdata/
systemctl start sonarr.service
systemctl status sonarr.service

No, I did not remove it. But I did move after installation. I took some time to realize that I may need more space in user’s folder. So after system installation I decided to move the userspace and use the tool provided for that.

About your suggestions, here is the result from status command:

tcs@rpi2dpi:~$ sudo systemctl status sonarr.service
● sonarr.service - Sonarr (DietPi)
     Loaded: loaded (/etc/systemd/system/sonarr.service; enabled; preset: enabled)
     Active: active (running) since Fri 2025-08-08 18:13:44 -03; 3s ago
   Main PID: 26780 (Sonarr)
      Tasks: 7 (limit: 2083)
     Memory: 8.1M
        CPU: 3.095s
     CGroup: /system.slice/sonarr.service
             └─26780 /opt/sonarr/Sonarr -nobrowser -data=/mnt/dietpi_userdata/sonarr

Aug 08 18:13:44 rpi2dpi systemd[1]: Started sonarr.service - Sonarr (DietPi).

soo you are up and running now

Nice. Thank you very much.