Jump to content

Access to the path is denied Operation not permitted


Recommended Posts

Posted (edited)

Hi,

A few weeks ago I installed a 2nd NVME drive for Emby to run on in my unraid server, this massively increased performance especially when the mover is running and other tasks that used the cache drive.  So all has been good until I realized all my downloads are stuck on "queued" or "ready to transfer"

Looking into the log I see the error below, I am presuming this is because I moved the emby installation from /mnt/cache/emby to /mnt/disks/Sabrent_NVME/emby

Can anyone please help me fix the permission/access error?

Many Thanks in advance!!

 

*** Error Report ***
    Version: 4.4.3.0
    Command line: /app/emby/EmbyServer.dll -programdata /config -ffdetect /app/emby/ffdetect -ffmpeg /app/emby/ffmpeg -ffprobe /app/emby/ffprobe -restartexitcode 3
    Operating system: Unix 4.19.107.0
    64-Bit OS: True
    64-Bit Process: True
    User Interactive: True
    Runtime: file:///app/emby/System.Private.CoreLib.dll
    System.Environment.Version: 3.1.2
    Processor count: 32
    Program data path: /config
    Application directory: /app/emby
    System.UnauthorizedAccessException: System.UnauthorizedAccessException: Access to the path is denied.
     ---> System.IO.IOException: Operation not permitted
       --- End of inner exception stack trace ---
       at System.IO.FileSystem.CopyFile(String sourceFullPath, String destFullPath, Boolean overwrite)
       at System.IO.File.Copy(String sourceFileName, String destFileName, Boolean overwrite)
       at Emby.Server.Implementations.IO.ManagedFileSystem.CopyFile(String source, String target, Boolean overwrite)
       at Emby.Server.Sync.SyncJobProcessor.ConvertSubtitles(String temporaryPath, StreamInfo streamInfo, SubtitleStreamInfo subtitleStreamInfo, CancellationToken cancellationToken)
       at Emby.Server.Sync.SyncJobProcessor.ConvertSubtitles(SyncJobItem jobItem, List`1 subtitles, StreamInfo streamInfo, CancellationToken cancellationToken)
       at Emby.Server.Sync.SyncJobProcessor.SyncVideo(SyncJobItem jobItem, Video item, User user, Boolean enableConversion, SyncOptions syncOptions, ISyncProvider provider, IProgress`1 progress, CancellationToken cancellationToken)
       at Emby.Server.Sync.SyncJobProcessor.ProcessJobItem(SyncJobItem jobItem, Boolean enableConversion, IProgress`1 progress, CancellationToken cancellationToken)
       at Emby.Server.Sync.SyncJobProcessor.SyncJobItems(SyncJobItem[] items, Boolean enableConversion, IProgress`1 progress, CancellationToken cancellationToken)
       at Emby.Server.Sync.SyncManager.CreateJob(SyncJobRequest request, Int64 requestedItemId, Int64 parentId, User user, CancellationToken cancellationToken)
       at Emby.Server.Sync.SyncManager.CreateJob(SyncJobRequest request, CancellationToken cancellationToken)
       at Emby.Server.Sync.Api.SyncService.Post(CreateSyncJob request)
       at Emby.Server.Implementations.Services.ServiceController.GetTaskResult(Task task)
       at Emby.Server.Implementations.Services.ServiceHandler.ProcessRequestAsync(HttpListenerHost appHost, IRequest httpReq, IResponse httpRes, RestPath restPath, String responseContentType, CancellationToken cancellationToken)
       at Emby.Server.Implementations.HttpServer.HttpListenerHost.RequestHandler(IRequest httpReq, ReadOnlyMemory`1 urlString, ReadOnlyMemory`1 localPath, CancellationToken cancellationToken)
    Source: System.IO.FileSystem
    TargetSite: Void CopyFile(System.String, System.String, Boolean)
    InnerException: System.IO.IOException: Operation not permitted
    Source: 
    TargetSite: 

Edited by mbc0
Posted

I am actually seeing loads of these errors, Emby seems to have permission to these folders so am I reading the error correctly? 

Does this error below mean that emby cannot access /unraid/Movies/Movies/Dumb and Dumber To (2014) ?

 

 

2020-07-30 14:02:27.081 Debug App: FolderImageProvider reports change to 1824640 - /unraid/Movies/Movies/Dumb and Dumber To (2014)
2020-07-30 14:02:27.081 Debug App: Running FolderImageProvider for /unraid/Movies/Movies/Dumb and Dumber To (2014)
2020-07-30 14:02:27.087 Error App: Error in Dynamic Image Provider
    *** Error Report ***
    Version: 4.4.3.0
    Command line: /app/emby/EmbyServer.dll -programdata /config -ffdetect /app/emby/ffdetect -ffmpeg /app/emby/ffmpeg -ffprobe /app/emby/ffprobe -restartexitcode 3
    Operating system: Unix 4.19.107.0
    64-Bit OS: True
    64-Bit Process: True
    User Interactive: True
    Runtime: file:///app/emby/System.Private.CoreLib.dll
    System.Environment.Version: 3.1.2
    Processor count: 32
    Program data path: /config
    Application directory: /app/emby
    System.UnauthorizedAccessException: 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.FileSystem.CopyFile(String sourceFullPath, String destFullPath, Boolean overwrite)
       at Emby.Server.Implementations.IO.ManagedFileSystem.CopyFile(String source, String target, Boolean overwrite)
       at Emby.Server.Implementations.Images.BaseDynamicImageProvider`1.CreateSingleImage(IList`1 itemsWithImages, String outputPathWithoutExtension, ImageType imageType)
       at Emby.Server.Implementations.Photos.BaseFolderImageProvider`1.CreateImage(BaseItem item, IList`1 itemsWithImages, String outputPathWithoutExtension, ImageType imageType, Int32 imageIndex)
       at Emby.Server.Implementations.Images.BaseDynamicImageProvider`1.FetchToFileInternal(BaseItem item, IList`1 itemsWithImages, ImageType imageType, CancellationToken cancellationToken)
       at Emby.Server.Implementations.Images.BaseDynamicImageProvider`1.FetchAsync(T item, MetadataRefreshOptions options, CancellationToken cancellationToken)
       at MediaBrowser.Providers.Manager.MetadataService`2.RunCustomProvider(ICustomMetadataProvider`1 provider, TItemType item, String logName, MetadataRefreshOptions options, RefreshResult refreshResult, CancellationToken cancellationToken)
    Source: System.IO.FileSystem
    TargetSite: Void ThrowExceptionForIoErrno(ErrorInfo, System.String, Boolean, System.Func`2[Interop+ErrorInfo,Interop+ErrorInfo])
    InnerException: System.IO.IOException: Operation not permitted
    Source: 
    TargetSite: 

Posted

I'd start by looking at the different paths listed on the dashboard at the bottom of the admin screen.

Make sure Emby has proper permissions to those directories.  Then check any specific "temp" locations you might have set like for transcoding, etc

If you're saving metadata to the media directory of course those directories need to have write permission as well for the user running Emby Server.

Have you done these things?

Posted (edited)
15 minutes ago, cayars said:

I'd start by looking at the different paths listed on the dashboard at the bottom of the admin screen.

Make sure Emby has proper permissions to those directories.  Then check any specific "temp" locations you might have set like for transcoding, etc

If you're saving metadata to the media directory of course those directories need to have write permission as well for the user running Emby Server.

Have you done these things?

Hi, 

Thank you for your response!

As far as I can tell there is no reason for these errors.  I have however just performed a fresh installation onto the unassigned drive I use and got the error below when trying to install a plugin.  I repeated the steps to my cache drive and all is well.  This does not make much sense to me as all folders on both fresh installations on the cache or unassigned drive are created by Emby? I save all metadata within emby, not in the media folders

*** Error Report ***
    Version: 4.4.3.0
    Command line: /system/EmbyServer.dll -programdata /config -ffdetect /bin/ffdetect -ffmpeg /bin/ffmpeg -ffprobe /bin/ffprobe -restartexitcode 3
    Operating system: Unix 4.19.107.0
    64-Bit OS: True
    64-Bit Process: True
    User Interactive: True
    Runtime: file:///system/System.Private.CoreLib.dll
    System.Environment.Version: 3.1.2
    Processor count: 32
    Program data path: /config
    Application directory: /system
    System.UnauthorizedAccessException: System.UnauthorizedAccessException: Access to the path is denied.

image.png.a7d59f3b0eef6d9fdac15628ab25cc5f.png

image.png.6e325cb54ca10c97d2c0aea497358af7.png

 

 

 

 

image.png

image.png

Edited by mbc0
Posted

What about the media folder itself?

Posted
9 minutes ago, cayars said:

What about the media folder itself?

image.png.098f2bfd4242be3e864c9db240487a5a.png

image.png.963e8b64e312dd58a085830ec91c4bb4.png

 

Posted

But just to be specific what are the permissions on /unraid/Movies/Movies/Dumb and Dumber To (2014)

Posted
5 minutes ago, cayars said:

But just to be specific what are the permissions on /unraid/Movies/Movies/Dumb and Dumber To (2014)

image.png.551144aa9a058f36c2d37dfd5690e6ca.png

image.png.9596a24b57c4abd9f9b8eb6ce29c28f4.png

Posted

OK let's try something as a test.

Go into your movie library and turn off saving things to the media folder including NFO.

Now go to that specific movie and do a refresh including graphics.  This should cause the the graphics to write to the metadata folder.  Let's see if you get a different result.

It could be the error is not writing to disc but retrieving from the meta provider.

Posted

 

11 minutes ago, cayars said:

OK let's try something as a test.

Go into your movie library and turn off saving things to the media folder including NFO.

Now go to that specific movie and do a refresh including graphics.  This should cause the the graphics to write to the metadata folder.  Let's see if you get a different result.

It could be the error is not writing to disc but retrieving from the meta provider.

ok, thanks for this!

I already do not save images to the media folder I just have the movie file and an emby created nfo.

I have disabled nfo for this test

I have carried out a refresh metadata including images and pm'd you the log called embyserver

I then deleted the nfo in the media folder and re-enabled nfo again in the library settings, performed another metadata refresh with images and sent you the log for that one as well called embyserver2

No errors I can see in the log for that movie but plenty of the same error we are speaking about in other movie folders?

Thanks again for your time!

 

 

Posted

Got your PM with log. posting a few things but nothing is private

Seeing some errors

System.IO.DirectoryNotFoundException: System.IO.DirectoryNotFoundException: Could not find a part of the path '/embytemp/cache/news.json'.

2020-07-30 14:54:28.231 Info HttpClient: GET https://image.tmdb.org/t/p/original/zFEv7jtHVE3YiqbAi3ic2gJ5TGr.jpg
2020-07-30 14:54:28.273 Error HttpServer: Error processing request

2020-07-30 14:54:30.088 Info HttpClient: GET https://image.tmdb.org/t/p/original/3K0hN06OZp6KiB8xP7wYVFG7K6a.jpg
2020-07-30 14:54:30.533 Error HttpServer: Error processing request

When you try to open those URLs in a browser there is no graphic there.  Looks like you are experience the tmdb.org issue caused by them moving things around in their system with no redirect.

So these errors are likely directly linked to tmdb.org and you get different messages in the log depending on how the error is caught.

BTW, unless you have a special reason turn off DEBUG logging as it clutters up your log making it harder to read.

This tmdb.org issue is a problem for all of us that had metadata in libraries before they changed things as we now have the old links stored in the DB vs the new links that someone just building a library would have.

Posted

@cayarsThank you for that, 

Yes I am aware of the tmdb issue and to my knowledge there is no fix for this.  

I have only turned on debugging because of this issue with the "access to the path is denied"

Do you think this is something seperate or related to the tvdb errors?

Posted

Best I see it's metadata related.  If besides some pics not showing or updating and you aren't seeing any actual problems then I'd say your fine and can ignore these errors until the problem gets solved.

  • Like 1
Posted
6 minutes ago, cayars said:

Best I see it's metadata related.  If besides some pics not showing or updating and you aren't seeing any actual problems then I'd say your fine and can ignore these errors until the problem gets solved.

Thank you so much for your time and looking I appreciate it!

 

  • Like 1
Posted

I would suggest taking a look at this file permissions guide:

 

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...