Page 1 of 1

New Ubuntu install......Folder not Found

PostPosted: Wed Feb 28, 2018 10:27 pm
by g0rsq
I have just installed Subsonic on my Ubuntu 16.04 server.

I can connect to Subsonic via my Ubuntu desktop ([server ip]:4040) but when I go to "Settings" "Media Folders" (as administrator) I can not get Subsonic to recognize the path to my music folder, and get "folder not found" in red.

My music folder is mounted /mnt/nas/media/music on the server

I enter /mnt/nas/media/music in the folder box

The only entry that will not give "Folder not found" is /mnt/

When I check permissions:-

Code: Select all
ls -la /mnt/nas/media/music

result
Code: Select all

total 228
drwxrwsr-x 57 g0rsq music   4096 Feb 28 19:31 .
drwxrw-r--  4 g0rsq nogroup 4096 Jan 21 15:31 ..
drwxrwxrwx  7 g0rsq music   4096 Jan 25 22:17 Alice Russell
drwxrwxrwx  3 g0rsq music   4096 Jan 25 22:17 Alicia Keys
drwxrwxrwx  3 g0rsq music   4096 Jan 25 22:17 Amy Winehouse
drwxrwxrwx  4 g0rsq music   4096 Jan 25 22:17 Annie Lennox
drwxrwxrwx  5 g0rsq music   4096 Jan 25 22:17 Belinda Carlisle
etc


Owner of the /var/subsonic folder is a user "subsonic" and the user has been changed to subsonic in the /etc/default/subsonic file

I also added the user "subsonic" to the "music" group

Code: Select all
root@ubuntu-server:~# ls -la /var/subsonic


Code: Select all
total 52
drwxr-x---  6 subsonic subsonic  4096 Feb 28 20:50 .
drwxr-xr-x 14 root     root      4096 Feb 28 20:04 ..
drwxr-xr-x  2 subsonic subsonic  4096 Feb 28 20:50 db
drwxr-xr-x  3 subsonic subsonic  4096 Feb 28 20:05 jetty
drwxr-xr-x  7 subsonic subsonic  4096 Feb 28 20:05 lucene2
-rw-r--r--  1 subsonic subsonic  5711 Feb 28 22:06 subsonic.log
-rw-r--r--  1 subsonic subsonic   357 Feb 28 22:06 subsonic.properties
-rw-r--r--  1 subsonic subsonic 14186 Feb 28 22:07 subsonic_sh.log
drwxr-xr-x  2 subsonic subsonic  4096 Feb 28 20:04 transcode


Both UFW firewalls have been disabled

Any idea how to get Subsonic to see my Music folders?

Thanks

peter

Re: New Ubuntu install......Folder not Found

PostPosted: Wed Feb 28, 2018 11:07 pm
by toolman
I'm not familiar with Linux / Ubuntu but the error "Folder Not Found" means that the user that's running the Subsonic service doesn't have sufficient permissions to acces the folder you specified.
Since you don't get the error when you only specify the "top"-folder (MNT) one might assume that there's a problem with the permissions in the subfolders OR you made a typo....

Re: New Ubuntu install......Folder not Found

PostPosted: Thu Mar 01, 2018 4:30 pm
by g0rsq
toolman

thanks for you response.

I too think it is a permissions thing, but for the life of me can not figureout what is wrong. Maybe someone with Ubuntu experience can help further!

My folder structure is:-

/mnt/nas/media/music/"artist"

Code: Select all
drwxrw-r--   4 root root  4096 Feb 28 23:04 mnt

drwxrwxr-x  7 root root 4096 Feb 20 23:45 nas

drwxrw-r--  4 g0rsq  nogroup  4096 Jan 21 15:31 media

drwxrwsr-x 57 g0rsq music   4096 Feb 28 19:31 music

drwxrwxrwx  7 g0rsq music   4096 Jan 25 22:17 Alice Russell


Code: Select all
~$ sudo getent group music
music:x:1005:subsonic,g0rsq


Code: Select all
root@ubuntu-server:~# ls -la /var/subsonic
total 52
drwxr-x---  6 subsonic subsonic  4096 Feb 28 20:50 .
drwxr-xr-x 14 root     root      4096 Feb 28 20:04 ..
drwxr-xr-x  2 subsonic subsonic  4096 Feb 28 20:50 db
drwxr-xr-x  3 subsonic subsonic  4096 Feb 28 20:05 jetty
drwxr-xr-x  7 subsonic subsonic  4096 Feb 28 20:05 lucene2
-rw-r--r--  1 subsonic subsonic  5711 Feb 28 22:06 subsonic.log
-rw-r--r--  1 subsonic subsonic   357 Feb 28 22:06 subsonic.properties
-rw-r--r--  1 subsonic subsonic 14186 Feb 28 22:07 subsonic_sh.log
drwxr-xr-x  2 subsonic subsonic  4096 Feb 28 20:04 transcode


"subsonic" is a user without local login, but even if I change ownership of /var/subsonic to root:root I get same issue

Also only folder I do not get "file not found" is /mnt/, but this is more restrictive than /mnt/nas, yet permissions are for same users :roll:

I just do not see where the issue with permissions is, as "subsonic" has full rwx on /music :cry:

Re: New Ubuntu install......Folder not Found

PostPosted: Thu Mar 01, 2018 5:48 pm
by g0rsq
Sorry

Pretty well ignore last post as I now know the problem...but not the solution :?

The problem occurs when i do this from the install guide:-
Change user

By default the Subsonic process is run as the root user. To improve security it is strongly advised that you run it as a dedicated user with less powerful privileges. You can specify this user by setting the SUBSONIC_USER variable in /etc/default/subsonic.


I created a standard user

Code: Select all
sudo adduser subsonic


and changed SUBSONIC_USER variable in /etc/default/subsonic from "root" to "subsonic"

After doing this I get folder not found

I understand there is a security risk using "SUBSONIC_USER=root" , but other than giving "subsonic" root privileges i do not know what to do!

When i use my own login user-name, I get the same folder not found

One possible clue might be i can not open /var/subsonic unless i am "super user" sudo -i

Code: Select all
g0rsq@ubuntu-server:~$ dir /var/subsonic
dir: cannot open directory '/var/subsonic': Permission denied


I did try and change ownership of /var/subsonic to user "subsonic" but it made no difference :cry:

Any ideas?

Re: New Ubuntu install......Folder not Found

PostPosted: Thu Mar 01, 2018 8:55 pm
by toolman

Re: New Ubuntu install......Folder not Found

PostPosted: Thu Mar 01, 2018 11:22 pm
by g0rsq
Thanks again

I cant change "ownership" of the music folder as it is part of a SAMBA share structure, though if I re-construct all my SAMBA shares this is possible!

I did add the "subsonic" user to the "music" group, and assume as the "music" group has full access to the folders that this should enable "subsonic" to inherit these permissions on these folders.

I am going to leave things as they are for a while, while I try and understand more about users, groups and permissions.

I am new to Ubuntu and coming from Windows 10 find this all overly complicated as nothing works "out the box" :cry:

Re: New Ubuntu install......Folder not Found

PostPosted: Fri Mar 02, 2018 12:41 pm
by toolman
Like I said, I don't know a thing about Ubuntu or Linux but I know that switching from Windows to Ubuntu requires some study and practice.
But on the other side: there are so much sites that offer you lessons that the switch might not be so difficult after all.
https://www.makeuseof.com/tag/ubuntu-an ... ers-guide/