Unable to update on Linux headless server w/o root access

Sonarr version (exact version): 2.0.0.4230
Mono version (if Sonarr is not running on Windows): 4.2.3
OS: Ubuntu 14.04.4
((Debug logs)): https://www.dropbox.com/s/io0sqlxbwjqxab6/sonarr.debug.txt?dl=0
(Make sure debug logging is enabled in settings and post the full log to hastebin/pastebin/dropbox/google drive or something similar, do not post them directly here)
Description of issue:

Hi,
I cannot update from 4230 to latest version. I’m seeing this in the log

[v2.0.0.4230] System.UnauthorizedAccessException: Access to the path “/tmp/nzbdrone_backup/config.xml” is denied.

I’m on a server without root access, only home directory access. Sonarr has updated fine for the past year. Did something change with how updates are extracted?

I see config.xml and nzbdrone.db in /tmp/nzbdrone_backup but another user is owner of the files

Thanks for the help

What do the update logs show (available in the UI under the Update logs tab)?

Are you on a shared system where other users are using Sonarr? A seedbox maybe?

Hi Thanks for the reply

I’m not seeing anything in update logs from past few days. I cleared log and am trying to update but still no update logs for some reason.

Yes it’s a shared system. I’ve been using Sonarr on it for over a year. Every user has their own port, hostname, etc. Never had any issues before.

/tmp/nzbdrone_backup on my server is now empty (not sure why)

I’m now seeing this:

Error occurred while executing task ApplicationUpdate: Access to the path “/home/hd2/mixolyd/.config/NzbDrone/config.xml” or “/tmp/nzbdrone_backup/config.xml.partial~” is denied.

‘mixolyd’ is my home directory. Not sure why access to there is denied.

You should set up a tmp dir in your own home directory if it’s a shared server. the TMPDIR environment variable should help.

Quick google result, dunno if it’s correct: http://serverfault.com/questions/72955/how-to-change-default-tmp-to-home-user-tmp

I don’t have root access so not sure if I can do that. You think that’s the issue? Strange that it’s worked all this time

https://www.dropbox.com/s/acq6oam6ue9cnyk/sonarr.debug2.txt?dl=0 (latest)

Any idea what’s going on here?

16-9-15 22:16:32.0|Debug|Api|[GET] /api/diskspace: 200.OK (3793 ms)
16-9-15 22:16:33.4|Debug|Api|[POST] /api/command: 201.Created (147 ms)
16-9-15 22:16:33.4|Debug|InstallUpdateService|Checking for updates
16-9-15 22:16:33.5|Info|InstallUpdateService|Deleting old update files
16-9-15 22:16:33.5|Info|InstallUpdateService|Downloading update 2.0.0.4326
16-9-15 22:16:33.5|Debug|InstallUpdateService|Downloading update package from [http://download.sonarr.tv/v2/master/mono/NzbDrone.master.2.0.0.4326.mono.tar.gz] to [/tmp/nzbdrone_update/NzbDrone.master.2.0.0.4326.mono.tar.gz]
16-9-15 22:16:33.5|Debug|HttpClient|Downloading [http://download.sonarr.tv/v2/master/mono/NzbDrone.master.2.0.0.4326.mono.tar.gz] to [/tmp/nzbdrone_update/NzbDrone.master.2.0.0.4326.mono.tar.gz]
16-9-15 22:16:33.5|Debug|HttpClient|Downloading Completed. took 0s
16-9-15 22:16:33.5|Info|InstallUpdateService|Verifying update package
16-9-15 22:16:33.7|Info|InstallUpdateService|Update package verified successfully
16-9-15 22:16:33.7|Info|InstallUpdateService|Extracting Update package
16-9-15 22:16:33.7|Debug|ArchiveService|Extracting archive [/tmp/nzbdrone_update/NzbDrone.master.2.0.0.4326.mono.tar.gz] to [/tmp/nzbdrone_update/]
16-9-15 22:16:34.5|Debug|ArchiveService|Extraction complete.
16-9-15 22:16:34.5|Info|InstallUpdateService|Update package extracted successfully
16-9-15 22:16:34.5|Info|BackupService|Starting Backup
16-9-15 22:16:34.5|Debug|BackupService|Cleaning up old backup files
16-9-15 22:16:34.5|Debug|BackupService|Finished cleaning up old backup files
16-9-15 22:16:34.5|Debug|BackupService|Backing up config.xml
16-9-15 22:16:34.5|Debug|DiskTransferService|Copy [/home/hd2/mixolyd/.config/NzbDrone/config.xml] > [/tmp/nzbdrone_backup/config.xml]
16-9-15 22:16:36.1|Error|DiskProvider|Couldn’t get free space for /var/lib/docker/aufs

[v2.0.0.4230] System.InvalidOperationException: Permission denied —> Mono.Unix.UnixIOException: Permission denied [EACCES].
— End of inner exception stack trace —
at Mono.Unix.UnixDriveInfo.Refresh (Boolean throwException) <0x413fc1d0 + 0x000e3> in :0
at Mono.Unix.UnixDriveInfo.Refresh () <0x413fc1a0 + 0x00013> in :0
at Mono.Unix.UnixDriveInfo.get_AvailableFreeSpace () <0x413fc120 + 0x0000f> in :0
at NzbDrone.Mono.ProcMount.get_AvailableFreeSpace () <0x413fc0f0 + 0x0001b> in :0
at NzbDrone.Mono.DiskProvider.GetAvailableSpace (System.String path) <0x413c6280 + 0x001e4> in :0

16-9-15 22:16:36.1|Error|DiskProvider|Couldn’t get total space for /var/lib/docker/aufs

[v2.0.0.4230] System.InvalidOperationException: Permission denied —> Mono.Unix.UnixIOException: Permission denied [EACCES].
— End of inner exception stack trace —
at Mono.Unix.UnixDriveInfo.Refresh (Boolean throwException) <0x413fc1d0 + 0x000e3> in :0
at Mono.Unix.UnixDriveInfo.Refresh () <0x413fc1a0 + 0x00013> in :0
at Mono.Unix.UnixDriveInfo.get_TotalSize () <0x413fdc50 + 0x0000f> in :0
at NzbDrone.Mono.ProcMount.get_TotalSize () <0x413fdc20 + 0x0001b> in :0
at NzbDrone.Mono.DiskProvider.GetTotalSize (System.String path) <0x413cf7f0 + 0x001bb> in :0

16-9-15 22:16:36.1|Debug|Api|[GET] /api/diskspace: 200.OK (4041 ms)
16-9-15 22:16:37.7|Error|CommandExecutor|Error occurred while executing task ApplicationUpdate

[v2.0.0.4230] System.UnauthorizedAccessException: Access to the path “/home/(removed)/mixolyd/.config/NzbDrone/config.xml” or “/tmp/nzbdrone_backup/config.xml.partial~” is denied.
at System.IO.File.Copy (System.String sourceFileName, System.String destFileName, Boolean overwrite) <0x7fa9a4159a80 + 0x004d1> in :0
at NzbDrone.Common.Disk.DiskProviderBase.CopyFile (System.String source, System.String destination, Boolean overwrite) <0x414015b0 + 0x0021b> in :0
at NzbDrone.Common.Disk.DiskTransferService.TryCopyFileTransactional (System.String sourcePath, System.String targetPath, Int64 originalSize) <0x41401160 + 0x000d7> in :0

it’s your own user profile, nothing root about it.

I’m also seeing the same error for backup task as well.
My last successful backup was Monday

Error occurred while executing task Backup: Access to the path “/home/hd2/mixolyd/.config/NzbDrone/config.xml” or “/tmp/nzbdrone_backup/config.xml.partial~” is denied.

Why is this happening? My permissions haven’t changed :confused:

Is access to /tmp necessary? Has this always been the case? I’m trying to figure out what changed.

I am seeing in /tmp/nzbdrone_update the nzbdrone 2.0.0.4326 update file and a NzbDrone folder with my user as owner.

I see that nzbdrone_update has my user as owner but nzbdrone_backup has another user as owner. I think that’s why it’s failing. Could Sonarr be programmed to just create a differently named folder incase this happens

It’s fairly obvious. Who else has access to /tmp? After all, you said so yourself, it’s a shared system.
Who do you think has ownership of a file or folder inside /tmp? The user that creates the file. It’s no different than the parking spot in front of your house.
So likely someone else on the box is using Sonarr too.

Either way, it’s still a permission issue. Check the owner of /tmp/nzbdrone_backup and it’s contents.

I see that the empty backup folder in tmp has a different user as owner.

Is there a new behavior with Sonarr where the folder isn’t deleted after use?

I contacted my server admin and they are looking into it. “This issue seems to be occurring now with multiple users on the most recent update. We’re looking into a way to deal with this more efficiently.”

No there is no new behavior, just another user, and apparently my theory about what’s happening is correct.

I was about to suggest you contact the service admins, coz they’re in the best position to deal with it, but you already did that. :slight_smile:

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.