BloodyIron 24 Posted January 18, 2018 Share Posted January 18, 2018 Looks like when I try to run the backup plugin (after migrating from mono to .net core), it throws an error, but I thought I corrected the issue, and I'm not sure why it's still throwing errors... 2018-01-17 20:45:27.349 Error Server Configuration Backup: Error Copying /var/lib/emby/config/system.xml to /mnt/backups/Emby Backup - 2018-01-17 08.45.27 - Auto/system.xml *** Error Report *** Version: 3.2.60.0 Command line: /opt/emby-server/system/EmbyServer.dll -programdata /var/lib/emby -ffmpeg /opt/emby-server/bin/ffmpeg -ffprobe /opt/emby-server/bin/ffprobe -updatepackage emby-server-deb_{version}_amd64.deb Operating system: Unix 4.4.0.109 64-Bit OS: True 64-Bit Process: True User Interactive: True Processor count: 8 Program data path: /var/lib/emby Application directory: /opt/emby-server/system System.UnauthorizedAccessException: Access to the path is denied. ---> System.IO.IOException: Operation not permitted --- End of inner exception stack trace --- at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirectory, Func`2 errorRewriter) at Interop.CheckIo(Int64 result, String path, Boolean isDirectory, Func`2 errorRewriter) at System.IO.UnixFileSystem.CopyFile(String sourceFullPath, String destFullPath, Boolean overwrite) at System.IO.File.InternalCopy(String sourceFileName, String destFileName, Boolean overwrite) at System.IO.File.Copy(String sourceFileName, String destFileName, Boolean overwrite) at MBBackup.ServerEntryPoint.CopyFile(String source, String target) System.UnauthorizedAccessException at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirectory, Func`2 errorRewriter) at Interop.CheckIo(Int64 result, String path, Boolean isDirectory, Func`2 errorRewriter) at System.IO.UnixFileSystem.CopyFile(String sourceFullPath, String destFullPath, Boolean overwrite) at System.IO.File.InternalCopy(String sourceFileName, String destFileName, Boolean overwrite) at System.IO.File.Copy(String sourceFileName, String destFileName, Boolean overwrite) at MBBackup.ServerEntryPoint.CopyFile(String source, String target) InnerException: System.IO.IOException System.IO.IOException: Operation not permitted It seems like it's obviously a filesystem permission issue, but emby:emby owns /var/lib/emby and recursive. Also, /var/lib/emby-server (and recursive) is owned root:emby and runs 775 (I switched it from root:root 755 to the root:emby 775). I'm not quite seeing where I need to fix my permissions.... any ideas? (I'm going to restart the service in a minute too) Link to comment Share on other sites More sharing options...
Luke 37132 Posted January 18, 2018 Share Posted January 18, 2018 It appears there is no write access to this location: /mnt/backups/Emby Backup - 2018-01-17 08.45.27 - Auto Link to comment Share on other sites More sharing options...
BloodyIron 24 Posted January 18, 2018 Author Share Posted January 18, 2018 Restarted service, same issue. Seriously, starting at permissions for source and target, can't see the issue @_@ Link to comment Share on other sites More sharing options...
BloodyIron 24 Posted January 18, 2018 Author Share Posted January 18, 2018 But that isn't true though. The parent permissions (for /mnt/backups) are root:emby and 775 And the target folder for Backup folders that are made are 1010:emby and 775 (the 1010 is a quirk with how this is network mounted I think, but shouldn't get in the way!) This is literally identical in setup to how it was before converting to .net core, and I made 3 backups successfully before the conversion, and restored from backup in the conversion! Weird! D: It appears there is no write access to this location: /mnt/backups/Emby Backup - 2018-01-17 08.45.27 - Auto Link to comment Share on other sites More sharing options...
LLDaLastDon 4 Posted January 18, 2018 Share Posted January 18, 2018 You are not alone. I am having the same issues since converting to .net core. The weird thing is it creates the folder and creates other files including the system.xml but errors on the system.xml file. Link to comment Share on other sites More sharing options...
NIS1169 0 Posted January 20, 2018 Share Posted January 20, 2018 (edited) I too am having the same problem, but I started fresh with the .net core version. Here are the pertinent parts of the log file. 2018-01-20 17:54:24.734 Info TaskManager: Executing Configuration Backup 2018-01-20 17:54:24.734 Info HttpServer: HTTP Response 204 to 192.168.193.108. Time: 3ms. http://media:8096/emby/ScheduledTasks/Running/a1e4a7962c72ac5e491497598d1ee479 2018-01-20 17:54:24.738 Info Server Configuration Backup: Backup of profile Default Started 2018-01-20 17:54:24.745 Info HttpServer: HTTP GET http://media:8096/emby/ScheduledTasks?isHidden=false. UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36 2018-01-20 17:54:24.749 Info HttpServer: HTTP Response 200 to 192.168.193.108. Time: 4ms. http://media:8096/emby/ScheduledTasks?isHidden=false 2018-01-20 17:54:24.749 Error Server Configuration Backup: Error Copying /var/lib/emby/config/system.xml to /media/network/backup/Emby-DB/Emby Backup - 2018-01-20 05.54.24 - Auto/system.xml *** Error Report *** Version: 3.2.60.0 Command line: /opt/emby-server/system/EmbyServer.dll -programdata /var/lib/emby -ffmpeg /opt/emby-server/bin/ffmpeg -ffprobe /opt/emby-server/bin/ffprobe -updatepackage emby-server-deb_{version}_amd64.deb Operating system: Unix 4.4.0.109 64-Bit OS: True 64-Bit Process: True User Interactive: True Processor count: 8 Program data path: /var/lib/emby Application directory: /opt/emby-server/system System.UnauthorizedAccessException: Access to the path is denied. ---> System.IO.IOException: Operation not permitted --- End of inner exception stack trace --- at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirectory, Func`2 errorRewriter) at Interop.CheckIo(Int64 result, String path, Boolean isDirectory, Func`2 errorRewriter) at System.IO.UnixFileSystem.CopyFile(String sourceFullPath, String destFullPath, Boolean overwrite) at System.IO.File.InternalCopy(String sourceFileName, String destFileName, Boolean overwrite) at System.IO.File.Copy(String sourceFileName, String destFileName, Boolean overwrite) at MBBackup.ServerEntryPoint.CopyFile(String source, String target) System.UnauthorizedAccessException at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirectory, Func`2 errorRewriter) at Interop.CheckIo(Int64 result, String path, Boolean isDirectory, Func`2 errorRewriter) at System.IO.UnixFileSystem.CopyFile(String sourceFullPath, String destFullPath, Boolean overwrite) at System.IO.File.InternalCopy(String sourceFileName, String destFileName, Boolean overwrite) at System.IO.File.Copy(String sourceFileName, String destFileName, Boolean overwrite) at MBBackup.ServerEntryPoint.CopyFile(String source, String target) InnerException: System.IO.IOException System.IO.IOException: Operation not permitted 2018-01-20 17:54:24.751 Error TaskManager: Error *** Error Report *** Version: 3.2.60.0 Command line: /opt/emby-server/system/EmbyServer.dll -programdata /var/lib/emby -ffmpeg /opt/emby-server/bin/ffmpeg -ffprobe /opt/emby-server/bin/ffprobe -updatepackage emby-server-deb_{version}_amd64.deb Operating system: Unix 4.4.0.109 64-Bit OS: True 64-Bit Process: True User Interactive: True Processor count: 8 Program data path: /var/lib/emby Application directory: /opt/emby-server/system System.UnauthorizedAccessException: Access to the path is denied. ---> System.IO.IOException: Operation not permitted --- End of inner exception stack trace --- at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirectory, Func`2 errorRewriter) at Interop.CheckIo(Int64 result, String path, Boolean isDirectory, Func`2 errorRewriter) at System.IO.UnixFileSystem.CopyFile(String sourceFullPath, String destFullPath, Boolean overwrite) at System.IO.File.InternalCopy(String sourceFileName, String destFileName, Boolean overwrite) at System.IO.File.Copy(String sourceFileName, String destFileName, Boolean overwrite) at MBBackup.ServerEntryPoint.CopyFile(String source, String target) at MBBackup.ServerEntryPoint.<ExecuteBackup>d__61.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at MBBackup.Entities.ScheduledBackupTask.<Execute>d__8.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Emby.Server.Implementations.ScheduledTasks.ScheduledTaskWorker.<ExecuteInternal>d__68.MoveNext() System.UnauthorizedAccessException at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirectory, Func`2 errorRewriter) at Interop.CheckIo(Int64 result, String path, Boolean isDirectory, Func`2 errorRewriter) at System.IO.UnixFileSystem.CopyFile(String sourceFullPath, String destFullPath, Boolean overwrite) at System.IO.File.InternalCopy(String sourceFileName, String destFileName, Boolean overwrite) at System.IO.File.Copy(String sourceFileName, String destFileName, Boolean overwrite) at MBBackup.ServerEntryPoint.CopyFile(String source, String target) at MBBackup.ServerEntryPoint.<ExecuteBackup>d__61.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at MBBackup.Entities.ScheduledBackupTask.<Execute>d__8.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Emby.Server.Implementations.ScheduledTasks.ScheduledTaskWorker.<ExecuteInternal>d__68.MoveNext() InnerException: System.IO.IOException System.IO.IOException: Operation not permitted 2018-01-20 17:54:24.751 Info TaskManager: Configuration Backup Failed after 0 minute(s) and 0 seconds As LLDaLastDon says, it creates the folder, and has three files in the folder: Edit: Uploaded a photo of the wrong backup folder and can't seem to upload and attach the new one, but it is identical to this folder, just time stamps correspond with the logs. Let me know if I can be of any further assistance. Edited January 20, 2018 by NIS1169 Link to comment Share on other sites More sharing options...
Luke 37132 Posted January 20, 2018 Share Posted January 20, 2018 @@NIS1169, it appears there is no write access to this location: /media/network/backup/Emby-DB/Emby Backup - 2018-01-20 05.54.24 - Auto Link to comment Share on other sites More sharing options...
LLDaLastDon 4 Posted January 20, 2018 Share Posted January 20, 2018 (edited) @@NIS1169, it appears there is no write access to this location: /media/network/backup/Emby-DB/Emby Backup - 2018-01-20 05.54.24 - Auto @@Luke, I thought the same. But the weird thing is the backup process created the folder to start the backup and started backing up files into it. But halts on the system.xml file. I looked at the system.xml that was copied and it was identical to the source. So, the copy appears to be successful. Is it trying to change permissions on the files after its copied over? Do you know the next file and/or folder its trying to start copying over? Maybe its not the system.xml file but the next file/folder its trying to backup. Edited January 20, 2018 by LLDaLastDon Link to comment Share on other sites More sharing options...
Luke 37132 Posted January 21, 2018 Share Posted January 21, 2018 Ok, I've pushed an update to the plugin. Let's see if that makes a difference. thanks. Link to comment Share on other sites More sharing options...
NIS1169 0 Posted January 21, 2018 Share Posted January 21, 2018 (edited) Ok, I've pushed an update to the plugin. Let's see if that makes a difference. thanks. Luke, Thanks for the update. I just updated the plugin (version 1.1.7.0), rebooted, and tried again. I'm still getting a failed message. Like before, there are three files in the folder it creates (Emby Backup - 2018-01-21 02.30.22 - Auto). The files are packageruntime.dat, profile.txt and system.xml. So, it is definitely not a permission issue on the save location as the plugin is creating the folder and backing up these three files. Here is log info 2018-01-21 14:30:22.306 Info Server Configuration Backup: Backup of profile Default Started 2018-01-21 14:30:22.311 Info HttpServer: HTTP GET http://media:8096/emby/ScheduledTasks?isHidden=false. UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36 2018-01-21 14:30:22.314 Info HttpServer: HTTP Response 200 to 192.168.193.8. Time: 3ms. http://media:8096/emby/ScheduledTasks?isHidden=false 2018-01-21 14:30:22.317 Error Server Configuration Backup: Error Copying /var/lib/emby/config/system.xml to /media/network/backup/Emby-DB/Emby Backup - 2018-01-21 02.30.22 - Auto/system.xml *** Error Report *** Version: 3.2.60.0 Command line: /opt/emby-server/system/EmbyServer.dll -programdata /var/lib/emby -ffmpeg /opt/emby-server/bin/ffmpeg -ffprobe /opt/emby-server/bin/ffprobe -updatepackage emby-server-deb_{version}_amd64.deb Operating system: Unix 4.4.0.109 64-Bit OS: True 64-Bit Process: True User Interactive: True Processor count: 8 Program data path: /var/lib/emby Application directory: /opt/emby-server/system System.UnauthorizedAccessException: Access to the path is denied. ---> System.IO.IOException: Operation not permitted --- End of inner exception stack trace --- at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirectory, Func`2 errorRewriter) at Interop.CheckIo(Int64 result, String path, Boolean isDirectory, Func`2 errorRewriter) at System.IO.UnixFileSystem.CopyFile(String sourceFullPath, String destFullPath, Boolean overwrite) at System.IO.File.InternalCopy(String sourceFileName, String destFileName, Boolean overwrite) at System.IO.File.Copy(String sourceFileName, String destFileName, Boolean overwrite) at MBBackup.ServerEntryPoint.CopyFile(String source, String target, Boolean createDirectory) System.UnauthorizedAccessException at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirectory, Func`2 errorRewriter) at Interop.CheckIo(Int64 result, String path, Boolean isDirectory, Func`2 errorRewriter) at System.IO.UnixFileSystem.CopyFile(String sourceFullPath, String destFullPath, Boolean overwrite) at System.IO.File.InternalCopy(String sourceFileName, String destFileName, Boolean overwrite) at System.IO.File.Copy(String sourceFileName, String destFileName, Boolean overwrite) at MBBackup.ServerEntryPoint.CopyFile(String source, String target, Boolean createDirectory) InnerException: System.IO.IOException System.IO.IOException: Operation not permitted 2018-01-21 14:30:22.320 Error TaskManager: Error *** Error Report *** Version: 3.2.60.0 Command line: /opt/emby-server/system/EmbyServer.dll -programdata /var/lib/emby -ffmpeg /opt/emby-server/bin/ffmpeg -ffprobe /opt/emby-server/bin/ffprobe -updatepackage emby-server-deb_{version}_amd64.deb Operating system: Unix 4.4.0.109 64-Bit OS: True 64-Bit Process: True User Interactive: True Processor count: 8 Program data path: /var/lib/emby Application directory: /opt/emby-server/system System.UnauthorizedAccessException: Access to the path is denied. ---> System.IO.IOException: Operation not permitted --- End of inner exception stack trace --- at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirectory, Func`2 errorRewriter) at Interop.CheckIo(Int64 result, String path, Boolean isDirectory, Func`2 errorRewriter) at System.IO.UnixFileSystem.CopyFile(String sourceFullPath, String destFullPath, Boolean overwrite) at System.IO.File.InternalCopy(String sourceFileName, String destFileName, Boolean overwrite) at System.IO.File.Copy(String sourceFileName, String destFileName, Boolean overwrite) at MBBackup.ServerEntryPoint.CopyFile(String source, String target, Boolean createDirectory) at MBBackup.ServerEntryPoint.<ExecuteBackup>d__61.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at MBBackup.Entities.ScheduledBackupTask.<Execute>d__8.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Emby.Server.Implementations.ScheduledTasks.ScheduledTaskWorker.<ExecuteInternal>d__68.MoveNext() System.UnauthorizedAccessException at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirectory, Func`2 errorRewriter) at Interop.CheckIo(Int64 result, String path, Boolean isDirectory, Func`2 errorRewriter) at System.IO.UnixFileSystem.CopyFile(String sourceFullPath, String destFullPath, Boolean overwrite) at System.IO.File.InternalCopy(String sourceFileName, String destFileName, Boolean overwrite) at System.IO.File.Copy(String sourceFileName, String destFileName, Boolean overwrite) at MBBackup.ServerEntryPoint.CopyFile(String source, String target, Boolean createDirectory) at MBBackup.ServerEntryPoint.<ExecuteBackup>d__61.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at MBBackup.Entities.ScheduledBackupTask.<Execute>d__8.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Emby.Server.Implementations.ScheduledTasks.ScheduledTaskWorker.<ExecuteInternal>d__68.MoveNext() InnerException: System.IO.IOException System.IO.IOException: Operation not permitted 2018-01-21 14:30:22.320 Info TaskManager: Configuration Backup Failed after 0 minute(s) and 0 seconds Thanks again for all your hard work! I've only been using emby for a little while, but absolutely love it and so does the family!! Edited January 21, 2018 by NIS1169 Link to comment Share on other sites More sharing options...
Luke 37132 Posted January 23, 2018 Share Posted January 23, 2018 It's an internal framework method throwing the unauthorized error though. It's almost as if it's successfully copying the file but still throwing an error anyway. Link to comment Share on other sites More sharing options...
skurvy_pirate 2 Posted January 25, 2018 Share Posted January 25, 2018 Just adding that I am having this exact same issue. Was working fine before, but now it is throwing that exception (and creating the directory and 3 files in it (packageruntime.dat, profile.txt, and system.xml), so it can obviously write to it. Is it having permissions issues reading from some of the directories it is trying to backup? Link to comment Share on other sites More sharing options...
skurvy_pirate 2 Posted February 25, 2018 Share Posted February 25, 2018 To follow up on this, I missed something when the docker container image was updated to .NET Core. Somehow everything worked (at least that I could tell), except the backup stuff. I noticed when starting the container I would get a bunch of chown errors. I was still using the old scrip I had to start the container and after redoing and simplifying it, backup is working again. Link to comment Share on other sites More sharing options...
Luke 37132 Posted February 25, 2018 Share Posted February 25, 2018 So now it is working for you? Link to comment Share on other sites More sharing options...
skurvy_pirate 2 Posted February 25, 2018 Share Posted February 25, 2018 Yeah, I am having no issues at all now. Link to comment Share on other sites More sharing options...
LLDaLastDon 4 Posted April 8, 2018 Share Posted April 8, 2018 I just installed a fresh copy of Emby Server on a newly Ubuntu server and the backup is still throwing the same exception. Any suggestions? It writes 3 files then errors. @@Luke what is it trying to do after it writes system.xml? Link to comment Share on other sites More sharing options...
Luke 37132 Posted April 8, 2018 Share Posted April 8, 2018 I just installed a fresh copy of Emby Server on a newly Ubuntu server and the backup is still throwing the same exception. Any suggestions? It writes 3 files then errors. @@Luke what is it trying to do after it writes system.xml? @@LLDaLastDon since it has been a while can you please attach a new log file? thanks. Link to comment Share on other sites More sharing options...
LLDaLastDon 4 Posted April 8, 2018 Share Posted April 8, 2018 server-63658779594.txt @@LLDaLastDon since it has been a while can you please attach a new log file? thanks. @@Luke, Sure thing. Its attached. Link to comment Share on other sites More sharing options...
Luke 37132 Posted April 9, 2018 Share Posted April 9, 2018 And you're saying this file is there? /media/backups/Emby/Emby Backup - 2018-04-08 10.20.27 - Auto/system.xml Link to comment Share on other sites More sharing options...
LLDaLastDon 4 Posted April 9, 2018 Share Posted April 9, 2018 And you're saying this file is there? /media/backups/Emby/Emby Backup - 2018-04-08 10.20.27 - Auto/system.xml Yes. The contents of the folder are below. Link to comment Share on other sites More sharing options...
Luke 37132 Posted April 9, 2018 Share Posted April 9, 2018 That's very strange. You could always try the beta server or wait until the next release and re-evaluate. We have updated to version 2.06 of the .net core runtime, so if this is a runtime problem like I suspect then it's always possible it could be resolved. Link to comment Share on other sites More sharing options...
LLDaLastDon 4 Posted April 9, 2018 Share Posted April 9, 2018 That's very strange. You could always try the beta server or wait until the next release and re-evaluate. We have updated to version 2.06 of the .net core runtime, so if this is a runtime problem like I suspect then it's always possible it could be resolved.I'll install the beta tomorrow and report back. Sent from my Pixel XL using Tapatalk Link to comment Share on other sites More sharing options...
LLDaLastDon 4 Posted April 11, 2018 Share Posted April 11, 2018 @@Luke I upgraded to 3.3.1.14 and still the same issue. Emby creates the directory and the first 3 files then dies. I have gotten a little further. I have the backup folder is a mounted NFS share from my NAS. I am not sure why this is an issue because emby has R/W access to. Hence how it created the folder and initial files. I changed the directory to be local and the backup ran fine. I didn't have to do this prior to using the .NET Core version. Its almost like something in the code is checking the permissions on the folder. In my cause the share is mounted for anyone can R/W to it on the server, but the owner and group is not a user or group on the emby server. But I do know emby can write to it because it created the folder. Link to comment Share on other sites More sharing options...
Luke 37132 Posted April 12, 2018 Share Posted April 12, 2018 Something is a little off. can you try uninstalling the plugin, verifying that the .dll is gone from /var/lib/emby/plugins And then install again from the catalog? Thanks. Link to comment Share on other sites More sharing options...
LLDaLastDon 4 Posted April 12, 2018 Share Posted April 12, 2018 Something is a little off. can you try uninstalling the plugin, verifying that the .dll is gone from /var/lib/emby/plugins And then install again from the catalog? Thanks. Same result. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now