Jump to content

*.nfo access denied update


damelloman

Recommended Posts

damelloman

*first post ever*

Running latest FreeNAS 11.2U6.  I have tv show Attack on Titan.  3 Seasons.  Season 2 won't populate in library.  Logs say:

2019-10-12 10:28:49.087 Error ProviderManager: Error in metadata saver
    *** Error Report ***

blah blah.... System.UnauthorizedAccessException: System.UnauthorizedAccessException: Access to the path "/usr/local/www/tvshows/Attack on Titan/Season 2/Attack on Titan s02e04.nfo" is denied.

 

Okay so Emby doesn't have write permission to the file correct?

 

Well in the FreeNAS shell it clearly shows:

Season 2 folder has owner of root and group owner of sharedmedia (sharedmedia ID is 1000 which matches GID inside emby) and 775 so it's group writable. 

.nfo files that are getting this error are the same, owned by root and sharedmedia and 775 so they are group writable. 

 

I don't understand why Emby is saying access denied to the .nfo files.  

I just tested to see "What would happen" and i tried to delete the .nfo file via Windows/network and got an error: "Invalid file handle."

So that's definitely the issue. I can delete the file in FreeBSD but not Windows. 

Emby accesses the file through the mount point though so shouldn't that have nothing to do with samba issue with Windows and UNIX?

 

My tvshows folder is shared as a Windows SMB share and not a UNIX NFS share.  

Could that be part of my problem?

 

I found a little info here:

https://www.ixsystems.com/community/threads/seeing-some-invalid-file-handle-errors.45934/

 

I am not aware of having any other write issues/errors. 

Any ideas anyone?

 

Short of deleting the files/folders and re-downloading them, anyone have a fix for this?  It's really not a big deal... more of an educational question/learning experience. 

 

Thank you.  

*Warning* I'm a noob... google wonder boy so please be gentle.  

Link to comment
Share on other sites

damelloman

I was googling and found: ERRbadfid 6 /* Invalid file handle */ from here: https://github.com/freebsd/freebsd/blob/master/sys/netsmb/smb.h

Then found: 

ERRDOS
(0x01)

ERRbadfid
(0x0006)

STATUS_INVALID_HANDLE
(0xC0000008)

EBADF

The Fid is invalid.

Fid: A 16-bit value that the Server Message Block (SMB) server uses to represent an opened file, named pipe, printer, or device. A Fid is returned by an SMB server in response to a client request to open or create a file, named pipe, printer, or device. The SMB server guarantees that the Fid value returned is unique for a given SMB connection until the SMB connection is closed, at which time the Fid value can be reused. The Fid is used by the SMB client in subsequent SMB commands to identify the opened file, named pipe, printer, or device.

 

So I guess something is corrupt somewhere in file system land?  (I don't know much about ZFS)

Link to comment
Share on other sites

makarai

Tbh: I dont know the exact issue here, however i am guessing that windows applied a certain permission change, there are some bits you can tick upon uploading the files.

 

Can you do a test for me.

 

Open a shell from freenas, navigate to that *.nfo file, type ls -la and paste the output here. rename the nfo file with 

mv blub.nfo blub_org.nfo

 and create a new one with emby, refresh the metadata will do the trick here,  i think.

shell into the folder again and print out ls -la, check the permission differences between the two files, ie the newly created blub.nfo vs the original file, i am guessing they are different are there are some ACL settings you can tick to mess up nfs access. Again i had this problem once 4 years ago, and cmpletly moved away from smb.

 

 

side note

I am guessing you are using a host mount emby server and not an nsf share? otherwise can you provide your nfs mount options maybe you used -ro or so 

Edited by makarai
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...