Jump to content


Photo

Windows UnauthorizedAccessException: Access to the path

windows UnauthorizedAccessException

  • Please log in to reply
9 replies to this topic

#1 EmbyWAM OFFLINE  

EmbyWAM

    Newbie

  • Members
  • 7 posts
  • Local time: 03:32 AM

Posted 30 January 2019 - 11:24 AM

Scheduled recording from Guide on Windows is creating the task. The task creates a folder with permissions:

d---rwx---+ 1 Administrators wamcn 0 Jan 30 05:00 'CBS4 This Morning - 5A'

The folder is empty. When I open the permissions to all, then the Server shows it as a program in Series, but there is no data.

I am wamcn logged in as an administrator. There are no other users on the system. There is one Emby user, me, with all emby permissions.

Schedule recordings were working, but began having this problem many weeks ago. Could be some Emby auto-update.

Here is the snippet from server logs.

 

2019-01-30 05:00:01.705 Info App: Writing file to path: D:\Emby\seriesrecordingpath\CBS4 This Morning - 5A\CBS4 This Morning - 5A 2019_01_30_05_00_00.ts
2019-01-30 05:00:01.706 Error App: Error recording to D:\Emby\seriesrecordingpath\CBS4 This Morning - 5A\CBS4 This Morning - 5A 2019_01_30_05_00_00.ts
*** Error Report ***
Version: 4.0.1.0
Command line: C:\Users\wamcn\AppData\Roaming\Emby-Server\system\EmbyServer.dll
Operating system: Microsoft Windows NT 6.2.9200.0
64-Bit OS: True
64-Bit Process: True
User Interactive: True
Processor count: 12
Program data path: C:\Users\wamcn\AppData\Roaming\Emby-Server\programdata
Application directory: C:\Users\wamcn\AppData\Roaming\Emby-Server\system
System.UnauthorizedAccessException: System.UnauthorizedAccessException: Access to the path 'D:\Emby\seriesrecordingpath\CBS4 This Morning - 5A\CBS4 This Morning - 5A 2019_01_30_05_00_00.ts' is denied.
   at System.IO.FileStream.ValidateFileHandle(SafeFileHandle fileHandle)
   at System.IO.FileStream.CreateFileOpenHandle(FileMode mode, FileShare share, FileOptions options)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
   at Emby.Server.Implementations.IO.ManagedFileSystem.GetFileStream(String path, FileOpenMode mode, FileAccessMode access, FileShareMode share, FileOpenOptions fileOpenOptions)
   at Emby.LiveTV.DirectRecorder.RecordFromDirectStreamProvider(IDirectStreamProvider directStreamProvider, String targetFile, TimeSpan duration, Action onStarted, CancellationToken cancellationToken)
   at Emby.LiveTV.EmbyTV.RecordStream(TimerInfo timer, DateTimeOffset recordingEndDate, ActiveRecordingInfo activeRecordingInfo)
Source: System.Private.CoreLib
TargetSite: Microsoft.Win32.SafeHandles.SafeFileHandle ValidateFileHandle(Microsoft.Win32.SafeHandles.SafeFileHandle)
   at System.IO.FileStream.ValidateFileHandle(SafeFileHandle fileHandle)
   at System.IO.FileStream.CreateFileOpenHandle(FileMode mode, FileShare share, FileOptions options)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
   at Emby.Server.Implementations.IO.ManagedFileSystem.GetFileStream(String path, FileOpenMode mode, FileAccessMode access, FileShareMode share, FileOpenOptions fileOpenOptions)
   at Emby.LiveTV.DirectRecorder.RecordFromDirectStreamProvider(IDirectStreamProvider directStreamProvider, String targetFile, TimeSpan duration, Action onStarted, CancellationToken cancellationToken)
   at Emby.LiveTV.EmbyTV.RecordStream(TimerInfo timer, DateTimeOffset recordingEndDate, ActiveRecordingInfo activeRecordingInfo)


#2 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 153639 posts
  • Local time: 06:32 AM

Posted 30 January 2019 - 02:18 PM

Hi, looks like emby server does not have write access to this folder:

D:\Emby\seriesrecordingpath\CBS4 This Morning - 5A

Have you checked on this? Thanks !



#3 EmbyWAM OFFLINE  

EmbyWAM

    Newbie

  • Members
  • 7 posts
  • Local time: 03:32 AM

Posted 30 January 2019 - 02:24 PM

That is the problem. Why does it not have write permissions? Emby is creating the folder for the recorded show. D:\Emby\seriesrecordingpath is wide open:

 

drwxrwxrwx+ 1 wamcn  wamcn  0 Jan 30 05:00 seriesrecordingpath



#4 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 153639 posts
  • Local time: 06:32 AM

Posted 31 January 2019 - 12:44 AM

Please attach the complete emby server log. thanks.



#5 EmbyWAM OFFLINE  

EmbyWAM

    Newbie

  • Members
  • 7 posts
  • Local time: 03:32 AM

Posted 31 January 2019 - 09:11 AM

Log file attached.

Attached Files



#6 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 153639 posts
  • Local time: 06:32 AM

Posted 03 February 2019 - 12:52 AM

Hi, is this a series recording?



#7 EmbyWAM OFFLINE  

EmbyWAM

    Newbie

  • Members
  • 7 posts
  • Local time: 03:32 AM

Posted 03 February 2019 - 02:52 PM

It is recording it in the seriesrecording folder, but I did not specify to record the whole series, just this episode. The problem manifests the same with anything I schedule for recording from the Guide.



#8 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 153639 posts
  • Local time: 06:32 AM

Posted 05 February 2019 - 03:21 AM

Unfortunately I don't really know what to say here as there's no way for me to tell  you why it's being denied write access. What if you set the dvr recording path back to default?



#9 EmbyWAM OFFLINE  

EmbyWAM

    Newbie

  • Members
  • 7 posts
  • Local time: 03:32 AM

Posted 06 February 2019 - 07:44 AM

I changed series recording folder back to C drive, scheduled a recording, and I got a recording. It worked. I tried a different folder on the C drive, gave it the same ownership and wide open permissions, and a scheduled recording worked.

 

On the D drive I changed the ownership of the seriesrecoding folder to be the same as the ownership of the folder on the C drive. I checked that the folder permissions are wide open. I changed the series recording folder in Emby to the seriesrecording folder on the D drive. In the D drive properties, on the Security tab, I gave Administrators and all other groups full control. When I scheduled a recording to the D drive it failed again. In the Task Schedule history tab for the record there is this error:

 

\system\EmbyServer.exe" in instance "{7950ba6d-6b2b-4312-ba05-01fa883ab52d}" of task "\Emby Recording Bat Masterson Wed, 06 Feb 2019 03 00 00 GMT". Additional Data: Error Value: 2147943140.



#10 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 153639 posts
  • Local time: 06:32 AM

Posted 06 February 2019 - 02:44 PM

Thanks for the info. So we know you're able to record, now it's just a matter of getting the permissions worked out.







Also tagged with one or more of these keywords: windows, UnauthorizedAccessException

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users