Logitech Media Server use local Nextcloud folders? Topic is solved

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
Post Reply
User avatar
noobian
Posts: 26
Joined: Sun Mar 24, 2019 8:57 am

Logitech Media Server use local Nextcloud folders?

Post by noobian »

Hi there

I have installed Nextcloud and LMS via dietpi_software. Both working fine.

Can I define a folder of Nextcloud as LMS' mediafolder?
So I could upload music to my local Nextcloud-Folder and listen to it via LMS?
If yes: How would I accomplish this setting?

Basically: Can I access nextcloud's folders from other applications I installed via dietpi_software? What path would I have to pass to these other applications to get there? And do I have to mind permission-settings, so i.e. a player is allowed to play music stored within the used nextcloud-folders? :?

Help is much appreciated :)
User avatar
Joulinar
Posts: 2072
Joined: Sat Nov 16, 2019 12:49 am

Re: Logitech Media Server use local Nextcloud folders?

Post by Joulinar »

Hi,

FAQ:
Where is my data stored?
  • /mnt/dietpi_userdata/nextcloud
viewtopic.php?p=3026#p3026

As well you could use Nextcloud External Storage App to include other directories from your system
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
User avatar
noobian
Posts: 26
Joined: Sun Mar 24, 2019 8:57 am

Re: Logitech Media Server use local Nextcloud folders?

Post by noobian »

thx @Joulinar

Seems to be a permission issue

Nextcloud stores its data under /mnt/dietpi_userdata/nextcloud_data/userXY/files/...

But it looks like LMS has no access to it, only "root" does.
My guess is, that the Logitech Media Server does not run as root - and that's better that way ;)

When I try to access the folder as "dietpi" via SSH, -bash gives me a permission error.

When I use the webinterface of LMS, and try to browse towards "/mnt/dietpi_userdata/nextcloud_data/" I only get to the folder "/mnt/dietpi_userdata/" but no "nextcloud_data/" shows up in there ... I guess because of missing privileges ...

... Can you point me towards the solution concerning permissions?
I doubt, creating a nextcloud-user called "dietpi" oder "lms" would solve the issue.
User avatar
Joulinar
Posts: 2072
Joined: Sat Nov 16, 2019 12:49 am

Re: Logitech Media Server use local Nextcloud folders?

Post by Joulinar »

Hi,

don't mix up user in NextCloud with the user on Linux OS Level. These are 2 different worlds.

And yes you have a permission issue on OS level and that's what we need to fix because LMS and NextCloud are running with 2 different users.
  • LMS user > squeezeboxserver
  • NextCloud user > www-data
As you can see on OS level, the file systems permission for NextCloud folder is 770. Means, access is allowed for user and group www-data only

Code: Select all

root@DietPiVM1:/mnt/dietpi_userdata# ls -l
total 24
drwxrwxr-x 2 dietpi   dietpi   4096 Jan 17 15:50 downloads
drwxrwxr-x 2 dietpi   dietpi   4096 Mar  7 11:53 Music
drwxr-xr-x 5 mysql    mysql    4096 Mar  7 11:54 mysql
drwxrwx--- 5 www-data www-data 4096 Mar  7 11:55 nextcloud_data
drwxrwxr-x 2 dietpi   dietpi   4096 Jan 17 15:50 Pictures
drwxrwxr-x 2 dietpi   dietpi   4096 Jan 17 15:50 Video
To fix this, we would need to add user squeezeboxserver to group www-data by running following command.

Code: Select all

usermod -a -G www-data squeezeboxserver
once done reboot your system and you should be able to see the NextCloud folder on LMS WebUI, like this:
Attachments
Unbenannt.PNG
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
User avatar
noobian
Posts: 26
Joined: Sun Mar 24, 2019 8:57 am

Re: Logitech Media Server use local Nextcloud folders?

Post by noobian »

@Joulinar
thanks so much - all working now :D
Post Reply