INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Please assist in troubleshooting MC 28 on Linux - Permissions  (Read 1555 times)

Krishk

  • Recent member
  • *
  • Posts: 6

Hello, I have been using JRiver MC on Windows for some years now and have been able to resolve most of the issues/knowledge gaps by reading the responses in the forum. However, I recently installed Ubuntu to have a dedicated system running the JRiver media library. Despite doing a lot of self-troubleshooting and reading articles, I haven't been able to fix some issues. Please note that I started using Linux recently and may lack some basic skills, so I am hoping for some advice from my fellow members.

System overview - source: TrueNAS shares (SMB shares); JRiver Server: Ubuntu LTS; DAC - Mytek Brooklyn; JRiver Client (how to know for sure, I am syncing the library using IP address and port number) - Windows 10

Tagging: All music files are fully tagged externally with Cover Art embedded or inside the FLAC file.

Import process - I managed to mount my NAS drive through CIFS Utils with username and password created on the TrueNAS for SMB share. I then configured auto-import using the following tasks - Build thumbnails, update for external changes and fix broken links. JRiver successfully imported all folders and showed thumbnails.

Users: (A) TrueNAS SMB share username (jriver) is used to mount drives, but ls -l on the mounted drive shows (root) as the owner. (B) Linux user (media) is used for logging in and install jriver. Ls-l shows (media) as the owner of the Temp folder.

 Problem 1: Temp folder quickly fills out the drive, over 3GB crashing the JRiver application. After some research on the forum, it seems like it could be related to the permission issue. I need to remove the files from the terminal to run the application. This also prevents from using the GUI interface after reboot. Occasionally, JRiver removes image files from the Temp folder upon restart. What are these Temp files? I never saw so many image files when  I was running the application on my Windows system.

 Problem 2: Unable to edit any tags - update from library or update from tags. Get a failure pop-up when I click "update library from tags"; it could be again due to a permission issue.

 Problem 3: All files have embedded cover art, and I can see the cover art in the "Images" metadata. Yet, on the bottom left side, the cover art doesn't show up when playing on DAC - it shows up only on the local player. It is not a case of missing cover art, but I still tried "Quick Find," and it didn't make any difference - this issue was occurring on my Windows, too, so I don't think it is related to permissions.

 Problem 4: Can I run two instances of JRiver as a server so if one of them had to be shut down, the other could serve the library and sync all changes?

 Feature-related Question: Is it possible to automatically show the "cover view" on an external display like a tablet? I am aware of Gizmo, but I am looking for functionality similar to casting a screen. When music is played from any system or controller point, a dedicated display should automatically show the cover view.

I apologize if my questions are not clear. Please let me know if you need more information to understand the problem.
Logged

Wheaten

  • Guest
Re: Please assist in troubleshooting MC 28 on Linux - Permissions
« Reply #1 on: July 26, 2021, 12:29:54 am »

Please see my instruction for mounting in topic:
https://yabb.jriver.com/interact/index.php/topic,129811.0.html
Logged

Krishk

  • Recent member
  • *
  • Posts: 6
Re: Please assist in troubleshooting MC 28 on Linux - Permissions
« Reply #2 on: July 26, 2021, 07:46:30 am »

Thanks @Wheaten for sharing the link. It looks like I need to chmod to add Linux user (media, in my case) to the mounted folder. Can you please confirm? If that's the case, it may resolve issue with tagging. How about "Temp" folder not getting deleted automatically? I would appreciate any suggestions.
Logged

InflatableMouse

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3978
Re: Please assist in troubleshooting MC 28 on Linux - Permissions
« Reply #3 on: July 26, 2021, 12:10:34 pm »

Permissions can be tricky in Linux, its quite different from Windows shares.

For SMB shares it might not matter who is the real owner on the filesystem (truenas).

If I understand it right your user to access the share from Ubuntu is called 'media'?

Depending on who needs to access the share, there can be different ways to solve your issue. Unfortunately I'm not too versed on TrueNAS and how much we can do there (and whether its the same as on Linux because I believe TrueNAS is FreeBSD?).

So Problem 1 is probably due to the permissions issue. We need to fix that first because Problem 2 is due to that as well.

No idea about problem 3.

Problem 4 could be solved by running Media Server as a service which automatically starts and restarts on crashes/shutdowns.

Lets focus on the permissions first. Which clients (users) need to access the share?
Logged

Krishk

  • Recent member
  • *
  • Posts: 6
Re: Please assist in troubleshooting MC 28 on Linux - Permissions
« Reply #4 on: July 26, 2021, 12:23:59 pm »

Thanks, @InflatableMouse. Yes, I am accessing the shared folder "Collections" from Ubuntu as "media," but ls -l shows "root" as the owner. I tried multiple times to change owner to "media," but none seem to be working. I tried chown, chgrp and chmod commands, but still, the owner comes up as "root" for shared directory/folders. I mounted using cfis utils and updated etc/fstab.

Also, what is the problem with the "Temp" folder as the owner is "media?" Is it happening because "root" is the owner of shares, and jriver cannot write those files, resulting in overload in the "Temp" folder? I took a multi-OS license to have a dedicated server running JRiver all the time, but this is so messy. I should have stayed with Windows :-)
Logged

InflatableMouse

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3978
Re: Please assist in troubleshooting MC 28 on Linux - Permissions
« Reply #5 on: July 26, 2021, 12:53:25 pm »

Thanks, @InflatableMouse. Yes, I am accessing the shared folder "Collections" from Ubuntu as "media," but ls -l shows "root" as the owner. I tried multiple times to change owner to "media," but none seem to be working. I tried chown, chgrp and chmod commands, but still, the owner comes up as "root" for shared directory/folders.

That is because your server (truenas in this case) is probably preventing you from changing the owner remote (accessing via the share), and/or is forcing the owner to be root no matter what you try to make of it remotely.

The way to change ownership is to login to truenas and change the permissions from there. Once you manage to make that media:media, your ubuntu will be able to access them and have read/write permissions.

It depends how truenas is configured to publish smb shares. Im not familiar with truenas so I cant help you there. it might be "squashing" all incoming user access to root:root and use its internal user database to authenticate and grant access. Again, I don't know.

I mounted using cfis utils and updated etc/fstab.

Can you share the line please?

Also, what is the problem with the "Temp" folder as the owner is "media?" Is it happening because "root" is the owner of shares, and jriver cannot write those files, resulting in overload in the "Temp" folder? I took a multi-OS license to have a dedicated server running JRiver all the time, but this is so messy.

I don't know, Ive not encountered that one before. I can imagine though that if MC is not permitted to write tags and changes to the files, it will "buffer" them in /tmp?

I should have stayed with Windows :-)

It's not too late to turn back :-).
Logged

Wheaten

  • Guest
Re: Please assist in troubleshooting MC 28 on Linux - Permissions
« Reply #6 on: July 26, 2021, 02:16:51 pm »

Sorry for my late response.

If you mount a share through fstab, you run this command as a root user.
By adding a user, in your case media, you add the same user to your NAS with R/W access.
in this case, the rights will be inherited to your mounting point.
In your case your fstab shoudl look something like this:

Code: [Select]
<full path to your library> /mnt/music cifs credentials=/home/pi/.credentials,nofail,vers=3.0,x-systemd.automount,file_mode=0777,dir_mode=0777,uid=1000,gid=1000

//192.168.1.100/music /mnt/music cifs credentials=/home/media/.credentials,nofail,vers=3.0,x-systemd.automount,file_mode=0777,dir_mode=0777,uid=1000,gid=1000
Logged

Krishk

  • Recent member
  • *
  • Posts: 6
Re: Please assist in troubleshooting MC 28 on Linux - Permissions
« Reply #7 on: July 27, 2021, 12:40:53 pm »

@Wheatren and @InflatableMouse - Thanks a lot for your help! I very much appreciate the suggestions. Tinkering on Linux can be both fun ;D and annoyance >:(. After a lot of back and forth, it worked! It also helped me get comfortable with certain Linux commands. I struggled to get vim editor save the credentials, but now it all makes sense.

Here is what I did: I purged JRiver and remounted using the code @Wheatren suggested. This was the critical part "If you mount a share through fstab, you run this command as a root user." I checked after mounting, and it was still showing root as owner. I was about to give up and even downloaded Windows. Tried for one last time, but this time by updating fstab first, then I mounted the shares, and checked ls -l - it finally showed the user as the owner. :-)

Additionally, as @InflatableMouse suggested, I worked on the ACL configuration on TrueNAS. I put the user in the same group that I had on Windows (instead of a separate group) and used the same name as Linux user. Less confusion now.

Now all my mounted folders and application are controlled by the user. I don't see any files in the "temp" folder. I am now able to edit the tags, and JRiver instantly updated the tags. Both Problem 1 and 2 are resolved. Thank you both for your time!

Problem 3: I still cannot see "Cover Art" in the "Display" section (lower left) or "Display View" (ctrl+3) despite cover art already embedded in the file. Tag confirms the cover art in the "image" field, yet no luck on this.   

Problem 4: - Can you suggest the ideal settings to run another instance on a Windows machine as a "client" with the ability to edit tags? I read the instructions and made some modifications, but I don't want another DLNA Library (Generic) flashing up on all devices. I just want one main library running from a Linux server.
Logged

InflatableMouse

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3978
Re: Please assist in troubleshooting MC 28 on Linux - Permissions
« Reply #8 on: July 27, 2021, 12:52:47 pm »

Personally (speaking for myself here) I would never use those parameters in fstab. They cause all files (regardless of their contents) to be executable and editable by everyone and everything (unauthenticated and processes that would otherwise be denied access). In addition, every directory created is world-writable (again, writable by everything and everyone). Both of these are huge security issues. Both are also almost never required and are typically used as a shortcut to get things to work. I'm glad to hear its working for you now though but I would strongly advise that you take your time at some point and figure out how to make it work without those parameters.

Problem 3: sorry I can't help you there. Or maybe .... on second thought ... select the files, go to Advanced Tools, rebuild missing thumbnails? Try that.

Problem 4: I think this should do it: Enable authentication for your media server (on Linux) and you should be able to connect to it with any MC client, Windows or otherwise, authenticate and edit tags on the media server.
Logged

Wheaten

  • Guest
Re: Please assist in troubleshooting MC 28 on Linux - Permissions
« Reply #9 on: July 28, 2021, 12:46:45 am »

the tut mentioned: "If your familiar with Linux, I strongly suggest adapt the security to your needs, but for this tutorial I don’t mind."
Logged

Krishk

  • Recent member
  • *
  • Posts: 6
Re: Please assist in troubleshooting MC 28 on Linux - Permissions
« Reply #10 on: July 28, 2021, 03:36:54 pm »

Could you please explain what security risks are involved here? Is it because of the permission type "0777?" If so, I modified it to "0755." Also, it looks like there isn't a way to run this application without changing the ownership from root to user.

Regarding your suggestion to Problem 4, JRiver has only read-only authentication. Would I still be able to edit tags from another PC?
Logged

InflatableMouse

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3978
Re: Please assist in troubleshooting MC 28 on Linux - Permissions
« Reply #11 on: July 28, 2021, 03:56:21 pm »

Could you please explain what security risks are involved here? Is it because of the permission type "0777?" If so, I modified it to "0755." Also, it looks like there isn't a way to run this application without changing the ownership from root to user.

If that works, make sure you change the file permissions to 644 and directories to 755. Try and access the share from another pc with another user who should not have write permissions.

Regarding your suggestion to Problem 4, JRiver has only read-only authentication. Would I still be able to edit tags from another PC?

I thought that should work but I could be wrong. I can try and test that tomorrow if no one else chimes in to help you out.
Logged

Krishk

  • Recent member
  • *
  • Posts: 6
Re: Please assist in troubleshooting MC 28 on Linux - Permissions
« Reply #12 on: July 28, 2021, 03:58:46 pm »

Thanks @ Inflatable Mouse. Appreciate your response. I will implement the recommendations.
Logged
Pages: [1]   Go Up