Jump to content
Kayser-Sosa

Metadata Not In Folders

Recommended Posts

Kayser-Sosa

Ran into an issue, and hoping someone can either point me to an existing solution or help me solve the issue.


 


My Emby Server runs on it's own system in command line Ubuntu Server.


Ubuntu 16.04.4 LTS


All my media is on a different server that Emby has Read/Write access to.


 


Not a Linux expert and have to look most Linux things up, using Linux to force myself to learn it better.


 


I recently ran into the issue of the Emby root drive filling up due to metadata.  I had started with not having all of the libraries set to download the metadata to the media folders but went back and checked that box.  They continued to not save in the media folders but I didn't have any issues so thought nothing of it.  About a week or two ago I kept getting errors and could not log into the Web side.  Turns out the root folder on my Emby server has filled up.  So I deleted all the metadata on the Emby server.  Still didn't save correctly so I deleted my libraries and recreated them with the save metadata to the media folder checked.  That seemed to work, the metadata is now being saved to the media folders.  I just noticed though that when I add new media, the metadata is not saved to the media folders.  I also noticed that all the JPG, NFO, and SRT files in my media folders are 0 KB and unable to open to anything.  My Emby server root folder hasn't filled up like it did before.  Is there another setting that I'm missing?


Share this post


Link to post
Share on other sites
Luke

Hi, let's look at one media item as an example, say a movie. Can you refresh that movie manually and then check the movie folder to see if it populates metadata? thanks !

Share this post


Link to post
Share on other sites
Kayser-Sosa

Make sure I clear up what I stated above.  If I add new movies or TV shows, they get the metadata, but it isn't saved to the media folder.

 

I refreshed a movie saying Replace all Metadata including images.  The folder where the media is still only contains the movie file.  The movie is in the library that all my movies are in and the box is checked to save all metadata in the media folder.

Share this post


Link to post
Share on other sites
Luke

 

 

they get the metadata, but it isn't saved to the media folder.

 

Then I would check your settings for the Emby library they belong to. What have you enabled there? Can you please show us? thanks.

Share this post


Link to post
Share on other sites
Kayser-Sosa

See attached.

post-157626-0-54364700-1525707778_thumb.jpg

post-157626-0-00391500-1525707785_thumb.jpg

Share this post


Link to post
Share on other sites
Luke

Then in that case you may want to check the permissions on your folders because it's possible that Emby server doesn't have write access to save to them.

Share this post


Link to post
Share on other sites
Kayser-Sosa

That appears to be the case.  Not sure why these new folders are not inheriting permissions of the parent folder.

Share this post


Link to post
Share on other sites
Kayser-Sosa

Related to my first post.  The main drive on the Emby server filled up again in metadata.  I have my system set to store the metadata in the media folders.  Any idea why the metadata folder on the emby server is filling up again?

Share this post


Link to post
Share on other sites
Luke

This is where we last left off:

 

 

Then in that case you may want to check the permissions on your folders because it's possible that Emby server doesn't have write access to save to them.

 

Did you look into this? If this the reason, this is not an Emby problem. This is something you'll have to resolve. Thanks.

Share this post


Link to post
Share on other sites
Kayser-Sosa

All the folders have drwxrwxrwx+ for the username I use to log into the Ubuntu server.

Share this post


Link to post
Share on other sites
Kayser-Sosa

I messed up the upgrade just now, since it isn't in the repository.  So I just rebuilt the system.  All my media is on an share and Emby still has drwxrwxrwx+ for the username I use to log into the Ubuntu server.

 

Running the media scans now.  Hopefully this fixed my issue, waiting to see.

Share this post


Link to post
Share on other sites
Kayser-Sosa

Running into a similar issue again and hoping someone can either point me to the post regarding it or help me out.

 

If I select the entire library, click Refresh metadata, select Replace all metadata, and check Replace existing images, only Zero KB place holder picture files appear.  If I open the library and go to the movie itself and do the same thing, the picture files download correctly.  So to update all I have to manually go to every single file and update one by one.

 

I just upgraded my command line only Ubuntu Emby server from Ubuntu 16.04.4 LTS to 18.04.2 LTS.  Also just upgraded my samba server to the same version of Ubuntu, separate systems.

 

Not a Linux expert and have to look most Linux things up, using Linux to force myself to learn it.

Share this post


Link to post
Share on other sites
Luke

Are you running rclone or mergefs?

Share this post


Link to post
Share on other sites
Kayser-Sosa

Unsure as to what either of those are.  Neither seem familiar when I was setting up my emby or samba servers.

 

The only other thing I did, had help from a linux friend, was to force 777 mount options in my auto mount to the samba server from my emby server.

Edited by Kayser-Sosa

Share this post


Link to post
Share on other sites
Luke

Please attach the emby server log,thanks.

Share this post


Link to post
Share on other sites
Kayser-Sosa

Log is attached, this is the only log for 3/19.

 

I also attached a list of all logs in the folder, let me know if you would like any of the others.

embyserver.txt

post-157626-0-56306000-1553015321_thumb.jpg

Share this post


Link to post
Share on other sites
Kayser-Sosa

Before the upgrade of the OS, I originally had my share to the media mounted with the following in fstab.

 

//<server ip>/Movies /media/Movies cifs credentials=/home/kayser-sosa/.smbcredentials,iocharset=utf8,vers=1.0,sec=ntlm 0 0

 

At login I would run "sudo mount -a" and whenever I would add files or folders I would run "sudo chmod -R 777 /media/Movies"  It worked and the picture files would save to the media folders.

 

 

After the upgrade of the OS, the original fstab command would not work and I found out I had to make a minor change.  Had to add "ssp" to ntlm and it worked

 

//<server ip>/Movies /media/Movies cifs credentials=/home/kayser-sosa/.smbcredentials,iocharset=utf8,vers=1.0,sec=ntlmssp 0 0

 

I was wanting to get it setup so I wouldn't have to run "sudo chmod -R 777 /media/Movies" every single time and my friend suggested editing the fstabs to below.

 

//<server ip>/Movies /media/Movies cifs credentials=/home/kayser-sosa/.smbcredentials,iocharset=utf8,vers=1.0,dir_mode=0777,file_mode=0777,sec=ntlmssp 0 0

 

I did and since then the files have not saved in the folder and only show a 0 KB sized place holder in the file.  I changed it back and still doesn't save the files.

 

I did notice that the fanart.jpg is saving in the folder and the NFO files are saving.

Edited by Kayser-Sosa

Share this post


Link to post
Share on other sites
Luke

See all of these in the log:

2019-03-19 10:54:46.700 Error ProviderManager: UnauthorizedAccessException - Access to path /media/Movies/_TBD/TV/9-1-1/9-1-1.s02e09.web.x264-tbs-thumb.jpg is denied. Will retry saving to /var/lib/emby/metadata/library/cc/cc53d3fb04563b54bbf626c3fa7cf47c/poster.jpg

It's a shame that the 0-byte entries are getting created though. I'll have to see if we can stop that. 

Share this post


Link to post
Share on other sites
Kayser-Sosa

What user needs write access to my media folder to be able to save the files there?  Is it the same user for the transcode files?

 

I know its a permissions issue, I'm just not sure what I'm missing. 

 

I did note that if I delete the NFO file and any pictures for a movie, refresh all metadata (replacing existing checked) for the movie, both the pictures and NFO files come back as empty files.  Then if I run "sudo chmod -R 777 /media/Movies" and refresh all metadata without picture replace the NFO file gets written to.

Edited by Kayser-Sosa

Share this post


Link to post
Share on other sites
Luke

 

 

Is it the same user for the transcode files?

 

Yes, the user that is running the Emby server process. On ubuntu our install package creates a system user called emby and this is the user running the server process.

Share this post


Link to post
Share on other sites
Kayser-Sosa

Does the emby user have a password?

 

My media is stored on a samba share and I have local users with the same passwords setup across all devices, so the shares work.  If I create the emby user on the samba system and grant the rights there...

Share this post


Link to post
Share on other sites
Luke

No, it doesn't.

Share this post


Link to post
Share on other sites
Kayser-Sosa

@@mastrmind11

@@makarai

 

I recently changed my file structure.  I moved all my media from a samba share on an Ubuntu server to a Windows (SMB) share on a FreeNAS box.  I have the Emby server running on an Ubuntu virtual on the FreeNAS box, yes I know you can setup docker or the plugin (future idea for me to tinker with).  All my shares work without issue on my other windows and linux systems and even on the emby server where the share is setup using the commands at the bottom.

 

I am still getting the permissions error when setting save images and nfos files to the media directories.  So I am wondering if any of the following options might fix this?

 

I believe it was mentioned that the emby user on the emby server does not have a password.  Would it break the system if I added a password to the emby user?  My thinking is I can then create the emby user on the FreeNAS box with the password and add it to the same groups as the main login user of the share on the emby box.  Not able to add a user without a password on FreeNAS.

 

If the emby user is added to a group on the emby server, such as the group of the share user, do you think this might work?  I think I have tried in the past without luck.

 

Is there something else that I'm not thinking of or seeing, or other info that I could give about my setup that might help get this permissions issue fixed?

 

 

 

Share setup

 

Install CIFS

sudo apt-get update

sudo apt-get install cifs-utils

 

Create share folder

sudo mkdir /media/Movies

 

Edit fstab

sudo nano /etc/fstab

 

add the following line to the bottom of the fstab

//<server ip>/<share name> /media/Movies cifs credentials=/home/<username>/.smbcredentials,iocharset=utf8,vers=3.0,sec=ntlmssp 0 0

 

Creating .smbcredentials file

sudo nano ~/.smbcredentials

 

add the following lines to the file and save

username=<username, same as main login to the emby server and for the share>

password=<password of user>

 

Lock permissions to the file to user only

sudo chmod 600 ~/.smbcredentials

 

Mount the share

sudo mount -a

Share this post


Link to post
Share on other sites
Kayser-Sosa

So I think I have finally solved the issue.

 

edited my fstab file

 

it was this

//<server ip>/<share name> /media/Movies cifs credentials=/home/<username>/.smbcredentials,iocharset=utf8,vers=3.0,sec=ntlmssp 0 0

 

it is now this

//<server ip>/<share name> /media/Movies cifs credentials=/home/<username>/.smbcredentials,iocharset=utf8,vers=3.0,dir_mode=0777,file_mode=0777,sec=ntlmssp 0 0

 

Rebooted my emby server just for good measure and mounted again.  pics, nfs, and srt files are now saving in the directories.

 

I had tried this before without luck, but I may have had a corrupt server in there somewhere which was why it never wanted to work and kept messing me up.

Share this post


Link to post
Share on other sites
Luke

that's great, thanks for sharing !

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