Jump to content

File Permissions issue


agottschling

Recommended Posts

agottschling

Hey all, I've hit a brick wall here. Emby is constantly complaining about not being able to access NFO files when it runs a library scan, and I assume that there are some other permissions issues as well because when I try to view details on an episode sometimes, the app will seem to hang. 

When looking at the server logs, this is an example of what I will get:

2018-04-15 23:16:04.789 Error ProviderManager: Error in metadata saver
	*** Error Report ***
	Version: 3.3.1.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 -restartexitcode 3 -updatepackage emby-server-rpm_{version}_x86_64.rpm
	Operating system: Unix 4.4.120.45
	64-Bit OS: True
	64-Bit Process: True
	User Interactive: True
	Processor count: 2
	Program data path: /var/lib/emby
	Application directory: /opt/emby-server/system
	System.UnauthorizedAccessException: Access to the path '/mnt/thevault-media/TV Shows/Codename, Kids Next Door/Season 02/KND.S02E07.OP_G.H.O.S.T.__OP_F.U.G.I.T.I.V.E.DSR.XviD-dummy.nfo' is denied. ---> System.IO.IOException: Permission denied
	   --- End of inner exception stack trace ---
	   at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirectory, Func`2 errorRewriter)
	   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String path, OpenFlags flags, Int32 mode)
	   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 MediaBrowser.XbmcMetadata.Savers.BaseNfoSaver.SaveToFile(Stream stream, String path)
	   at MediaBrowser.XbmcMetadata.Savers.BaseNfoSaver.Save(BaseItem item, CancellationToken cancellationToken)
	   at MediaBrowser.Providers.Manager.ProviderManager.SaveMetadata(BaseItem item, ItemUpdateType updateType, IEnumerable`1 savers)
	System.UnauthorizedAccessException
	   at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirectory, Func`2 errorRewriter)
	   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String path, OpenFlags flags, Int32 mode)
	   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 MediaBrowser.XbmcMetadata.Savers.BaseNfoSaver.SaveToFile(Stream stream, String path)
	   at MediaBrowser.XbmcMetadata.Savers.BaseNfoSaver.Save(BaseItem item, CancellationToken cancellationToken)
	   at MediaBrowser.Providers.Manager.ProviderManager.SaveMetadata(BaseItem item, ItemUpdateType updateType, IEnumerable`1 savers)
	InnerException: System.IO.IOException
	System.IO.IOException: Permission denied

Also, Here's the error from the browser's javascript console when I try to browse info for some episodes (BTW. when this happens, I can't find anything out of the ordinary in the server logs):

(195) emby-scrollbuttons.js?v=3.3.1.0:1 Uncaught TypeError: Cannot read property 'getScrollPosition' of null
    at getScrollPosition (emby-scrollbuttons.js?v=3.3.1.0:1)
    at HTMLDivElement.onScroll (emby-scrollbuttons.js?v=3.3.1.0:1)
    at dispatchScrollEventIfNeeded (smoothscroller.js?v=3.3.1.0:1)
    at renderAnimateWithTransform (smoothscroller.js?v=3.3.1.0:1)
    at scrollerFactory.self.slideTo (smoothscroller.js?v=3.3.1.0:1)
    at HTMLDocument.dragHandler (smoothscroller.js?v=3.3.1.0:1)
router.js?v=3.3.1.0:1 appRouter - processing path request /web/itemdetails.html
router.js?v=3.3.1.0:1 appRouter - user is authenticated
router.js?v=3.3.1.0:1 appRouter - proceeding to /web/itemdetails.html
apiclient.js?v=3.3.1.0:1 Requesting url without automatic networking: http://media:8096/emby/Items/ddef35016df6d30d855ded9bc9457838/ThemeMedia?userId=b91e3d9873fa4eed80b6b3a045e6a78f&InheritFromParent=true
apiclient.js?v=3.3.1.0:1 Requesting url without automatic networking: http://media:8096/emby/Users/b91e3d9873fa4eed80b6b3a045e6a78f/Items/ddef35016df6d30d855ded9bc9457838
itemdetails.html:1 Uncaught (in promise) SyntaxError: Unexpected token I in JSON at position 2904
apphost.js?v=3.3.1.0:1 app is hidden

My setup is as follows:

I have Emby running on a spare PC i3, 8gb ram, etc. 

All my media files are on a Buffalo Terastation, in the same share which is mounted to a folder on the filesystem (can't access anonymously, that's disabled). It seems like I can read and write on the command line, but I can't really tell if everything is being synced completely on the NAS side.

 

Any ideas?

Link to comment
Share on other sites

Hi, you need to ensure Emby has write access those folders. Emby Server runs under a system user called Emby, so you need to make sure that user has write access. Alternatively you can also turn off saving of nfo files and then you won't see these errors in the log file anymore. Please let us know if this helps. Thanks.

Link to comment
Share on other sites

agottschling

Hi Luke,

When I mount the folder on the filesystem in /etc/fstab It's mounted as rw, and I've set the owner and group to the emby user. I can provide the mount line in fstab if needed. 

The strange part is that is only seems to happen with some files.

Any ideas?

Link to comment
Share on other sites

  • 1 year later...
agottschling

Hey Luke,

I've long since decommissioned that system that was running emby and have even decommissioned the NAS that I was using at the time.

I've moved everything onto Windows Server and a Synology NAS and haven't been having any issues with that.

Sorry I can't be more help

Link to comment
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...