Bugzilla – Bug 10943
mp3 can only be played/found if they are "world readable" / linux file permission 777
Last modified: 2009-10-02 18:04:50 UTC
Hi, I was trying to secure my server a little bit and changed the file permissions of my mp3 to "not world readable". But now the mp3s are neather playable nor findable (by a new scan) by the squeezecenter. The files belong to a group which the user "squeezecenter" is member of, and the files have the permission 750. To which user do I have to assign the files that they are playable again? Thanx fab
QA to verify and provide scanner logs
Created attachment 4757 [details] scannerlogfile
Created attachment 4758 [details] squeezeserver logfile I had the squeezeserver running for quite a while. At Feb 1st I changed the permissions of all my mp3 to "750". Then nothing was playing anymore. I did a rescan of the mp3 and than none were found. After a while I changed back some permissions of the mp3 in the directory ../Musik/runtergeladen/* to "755" because it was so quite :) and did a rescan again. Now these are working. The other with the "750"-permissions still don't. You probably will notice that by a look at the logfiles.
We are now planning to make a 7.3.3 release. Please review your bugs (all marked open against 7.3.3) to see if they can be fixed in the next few weeks, or if they should be retargeted for 7.4 or future. Thanks!
Since there's now a planned 7.3.3 release, bugs which won't make the cut-off are being moved to the next target out. If you feel that this bug needs to be addressed more (or less) urgently than the 7.4 release, please cc chris@slimdevices.com and leave a comment in the bug to that effect so we can review it. Thanks.
Hi Chris, I think (at leaste it looks like) nobody ever looked at this bug. Maybe it is only a small adjustment which needs to be done to fix it, so maybe you find the time to give it a try. That would be marvelous. Thanks...
For some reason Bugzilla did not change the target when I did this yesterday. Or maybe it was me. In either case, I'm trying it again.
If Squeezecenter is running as user 'squeezecenter' (default) and your music files are owned by your user, then chmod 750 files can not be accessed. Default installs will require the directory and files be chmod 755.
Hi Ross, that is correct, with default setting squeezecenter works. But now , for security reasons, I'd like to change chmod 755 to chmod 750. The question is who to do it! Which user or which group do the mp3 files to have to belong (chown). Maybe you can help me on that! Greetings
Fab, A better understanding of the Linux permissions system is required here I believe. The simple fact is that your SqueezeCenter is running as a totally different user and group -- so it will not be able to read files that do not have the "everyone" bit (the 3rd digit) to something "world readable" (aka, 4 or 5). The only other solution is to change the ownership of your music so that its "group" is the same as the SqueezeCenter software, or change SqueezeCenter to run as your particular username rather than its default username.
Actually, what is needed is a user friendly way to set the userid and/or group of the squeezecenter, and have it survive upgrades. For the issue here, having SC run in the same group of the user would be a better alternative than having run with his user id.
I dont see this change happening any time soon.. right now we follow the linux standards when we install a service which is to create an appropriate user and group for that service to run. Its up to the end- user to make sure their music is readable by this service. Setting the username/group of SqueezeCenter on-install is actually relatively tricky because you cant ask for input during the install of an RPM/DEB package. Furthermore, it would be more confusing than anything to MOST users if we asked that all the time. Why can't you just change your music folder to 755 permissions? Is this a system used by multiple users who you do not trust?
I believe a workable alternative is to add the squeezecenter user id to the group that the music files are in. AFAIK, you have to do this by actually editing /etc/group - but maybe someone else knows a better way.
Ok, that is my question. Since just having the files belong to a "squeezecenter" group didn't do it: How do I find out under what user (or userid) and what group (and groupid) squeezecenter runs? And is the userid I get with "ps aux" the one which the files hove to belong to? Thanks
On my linux box, squeezecenter runs with uid squeezecenter, in group users. My files are (by default) in my group - the same name as my uid. I edited the line for my group in /etc/group to be: my-uid:x:1000:squeezecenter which adds the uid squeezecenter to the group that can read my files.
Hi Marc, that's what I did. But now I found out, that squeezecenter is running under a user called "slimserver" even though I am using the current version (7.something) After I changed everything back to be readable for the user slimserver it sis working as it is supposed to. Not quite logic why it does it, but it works. Greetings
According to MWise's comments we have no plans to change default install for linux SBS. Lets explore this in the future, maybe around 8.0.