Jump to content
EmbyWAM

Windows UnauthorizedAccessException: Access to the path

Recommended Posts

EmbyWAM

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)

Share this post


Link to post
Share on other sites
Luke

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 !

Share this post


Link to post
Share on other sites
EmbyWAM

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

Share this post


Link to post
Share on other sites
Luke

Please attach the complete emby server log. thanks.

Share this post


Link to post
Share on other sites
Luke

Hi, is this a series recording?

Share this post


Link to post
Share on other sites
EmbyWAM

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.

Share this post


Link to post
Share on other sites
Luke

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?

Share this post


Link to post
Share on other sites
EmbyWAM

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.

Share this post


Link to post
Share on other sites
Luke

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

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...