PDA

View Full Version : Can I modify the server.prefs file?



ralbrux
2010-07-25, 02:42
Hi,

I'm new to squeezebox. I recently installed a duet and am running sqeezebox server 7.5.1 on a file & print server running under Debian Lenny to which a number of work stations are connected. Things are working ok, but when installing squeezebox server the settings menu would not would not allow me to define my music and playlists folders as they are on the Debian file server (which never functions as a work station). For security & backup reasons I put data in /opt/data on the Debian server.

Settings via the browser refuses to see any data files there at all, let alone my mp3 and m3u files. I assume this is because the authors of squeezebox server and/or maintainers of the Debian package are following some strict rules for Linux file systems since /opt is supposedly for non essential packages and not for data. So to get to my music I had to copy everything to /home in order that squeezebox server see my music and lets me play it via my received & controller.

Since mousing around on the wiki I learned of the server.prefs file which I see has 2 interesting (to me anyway) lines:

autodir: /home/<my user name>/Music
playlistdir: /home/<my user name>/Music/Playlist

These are, of course, the 2 folders I created and copied my music to in order to be able to access it.

Does anyone know if I can safely modify these 2 lines to refer to my original music folder in /opt and then restart squeezebox server to get things the way I would like?

Thanks for any assistance or ideas on this

Richard

Mnyb
2010-07-25, 02:46
But are not the problem really that the squeezeboxserver user does not have the rights to see those directories ?

If you change the permission settings on /opt it should work .

So it a linux feature sbs has no problem reading any dir if it got the rights to do so.

ralbrux
2010-07-25, 06:02
Thanks for you input Mnyb.

But no I don't think it is not a permissions issue.

The Debian server was set up several years back and I have no problem accessing any and all files and folders in /opt when I log onto the server as myself (not root) directly sitting in front of it from a terminal or from any work station either using Kubuntu or Windows on that work station. When I was installing squeezebox server on to the Debian server logged on as myself I was immediately confronted with the issue (settings comes up automatically upon install). At that point after several attempts I saw that I was not going to be able to point squeezebox server to my music files in /opt/data/Storage/Music so I then copied (at the command line) my music located in /opt/data/Storage/Music to /home on the Debian server. No access problems to the concerned folders.

So it seems clear that there is no permissions issue.

Richard

garym
2010-07-25, 06:17
Thanks for you input Mnyb.

But no I don't think it is not a permissions issue.

The Debian server was set up several years back and I have no problem accessing any and all files and folders in /opt when I log onto the server as myself (not root) directly sitting in front of it from a terminal or from any work station either using Kubuntu or Windows on that work station. When I was installing squeezebox server on to the Debian server logged on as myself I was immediately confronted with the issue (settings comes up automatically upon install). At that point after several attempts I saw that I was not going to be able to point squeezebox server to my music files in /opt/data/Storage/Music so I then copied (at the command line) my music located in /opt/data/Storage/Music to /home on the Debian server. No access problems to the concerned folders.

So it seems clear that there is no permissions issue.

Richard

I'm not a linux user, but I recall seeing similar posts and for squeezebox to see the files, squeezeboxserver is the user that needs the permissions (rather than you as the user).

pfarrell
2010-07-25, 06:29
On 07/25/2010 09:17 AM, garym wrote:
> I'm not a linux user, but I recall seeing similar posts and for
> squeezebox to see the files, squeezeboxserver is the user that needs
> the permissions (rather than you as the user).

Pretty smart for a non-*nix person.

Yes, permissions are very important.

I have mine setup so that I (or my userid) owns the songs and covers,
etc. and
allow the squeezebox server user be a member of the group. So it uses
the middle permission.

All the server needs is read access to the files, and directory access
(X) to the upper directories.


--
Pat Farrell http://www.pfarrell.com/

ralbrux
2010-07-25, 07:44
Mnyb

I think that you and Pfarrell are right and myself in the wrong.

Almost immediately after posting a reply to your first comments, I had a flash thinking that somewhere in install process I had seen that squeezebox server had created a user for itself. So I went to my /etc/passwd file and sure enough there was the user for the squeezebox server.

Unfortunately for me, my particular setup on our Debian server uses LDAP and PAM to manage users and groups. My Linux capacities are too weak for me to dare getting into LDAP & PAM all by lonesome and my Debian consultant who does all of the heavy lifting in matters Linux is in New York (I live in Brussels) and won't be back for a couple of weeks.

So I'll have to wait until then to get him to help me try including the squeezebox user in the group which has rights to /opt.

Since you were kind of enough to give me input, I'll try to give you feedback at that time if this post is still on the forum.

Thanks
Richard

Druboo
2010-07-25, 08:45
What are the present permissions for the Music folder?

ls -l /opt/data/Storage

Easier way than adding squeezeboxserver to your group is to give universal access to the music folder.
Either as root or sudo
chmod -R 755 /opt/data/Storage/Music

You should then be able to browse to that folder in Server settings - Music Folder.

ralbrux
2010-07-25, 11:42
Andy,

You are, of course, right - much easier than messing around with LDAP groups & users. The only further complication for me is that my music files are down a few levels in /opt/ on which I have set the sticky bit for the group owner in order to force group membership for newly created files (octal notation 2775).

Any way I made a separate folder immediately below opt and set it to 2755 and that does allow me to designate that folder in settings as my music folder.

So that means that your suggestion has solved the basic problem the rest is fine tuning to best fit this in with my security & backup strategies.

So thanks to you and all the others who intervened in this thread to give me assistance.

Richard