Squeezeboxserver must be run in root to open CDplayer plugin

Having issues with your DietPi installation, or, found a bug? Post it here.
Post Reply
lateboomer
Posts: 19
Joined: Sun Apr 15, 2018 5:26 am

Squeezeboxserver must be run in root to open CDplayer plugin

Post by lateboomer »

I have installed LMS to Dietpi running at Allo Usbridge. I have also enabled the CDplayer plugin. The issue is if I run the startup command at systemd under root, I can access cd player listing and add to playlist with CDplayer plugin:

Code: Select all

/usr/sbin/squeezeboxserver --prefsdir /var/lib/squeezeboxserver/prefs --logdir /var/log/squeezeboxserver/ --cachedir /var/lib/squeezeboxserver/cache --charset=utf8 --user root
However, if I run the startup scripts under default squeezeboxserver user, I can't access cd listing with error "Error loading CD index - (-1) No CD in drive'". I turned on the DEBUG mode in LMS and the error shown below:

Code: Select all

[18-06-08 11:01:14.9543] Plugins::CDplayer::Plugin::indexHandler (197) CDplayer - Indexhandler called
[18-06-08 11:01:14.9623] Plugins::CDplayer::CDhandler::cdromstatus (1131) CDROM radio device /dev/cdrom opened OK
[18-06-08 11:01:14.9693] Plugins::CDplayer::CDhandler::cdromstatus (1143) cdrom drive status 4  text=CDS_DISC_OK errmsg=PLUGIN_CDPLAYER_CDS_DISC_OK
[18-06-08 11:01:15.1672] Plugins::CDplayer::CDhandler::cdromstatus (1158) cdrom disc status 100  code=CDS_AUDIO errmsg=PLUGIN_CDPLAYER_CDS_AUDIO
[18-06-08 11:01:15.1687] Plugins::CDplayer::CDhandler::LoadCDandIdentify (191) Request to load CD and identify
[18-06-08 11:01:15.1700] Plugins::CDplayer::CDhandler::LoadCDandIdentify (192)  cd use is 0 Busy=1
[18-06-08 11:01:15.1718] Plugins::CDplayer::CDhandler::LoadCDandIdentify (227) Create Fork to read CD TOC using cdda2wav on unix device /dev/cdrom 
[18-06-08 11:01:15.1736] Plugins::CDplayer::Fork::go (95) Fork executing 'cdda2wav' with 'device=/dev/cdrom -verbose-level=toc -N -g -J'
[18-06-08 11:01:15.1746] Plugins::CDplayer::Fork::go (96) Fork actual executing 'exec "/usr/bin/cdda2wav" device=/dev/cdrom -verbose-level=toc -N -g -J  2> "/var/lib/squeezeboxserver/cache/Forkoutput2.txt"'
[18-06-08 11:01:15.1891] Plugins::CDplayer::Fork::go (104) Child task (1956) forked: exec "/usr/bin/cdda2wav" device=/dev/cdrom -verbose-level=toc -N -g -J  2> "/var/lib/squeezeboxserver/cache/Forkoutput2.txt"
[18-06-08 11:01:15.1918] Plugins::CDplayer::Fork::go (105) Child task is alive 
[18-06-08 11:01:16.1951] Plugins::CDplayer::Fork::checkFork (140) Forked task 1956 is not alive
[18-06-08 11:01:16.1969] Plugins::CDplayer::Fork::checkFork (143) FORK 1956 : Warning: setuid but not to root (uid=0, euid=108)
[18-06-08 11:01:16.1980] Plugins::CDplayer::Fork::checkFork (143) FORK 1956 : Dropping setuid privileges now.
[18-06-08 11:01:16.1990] Plugins::CDplayer::Fork::checkFork (143) FORK 1956 : Fatal error:  did not drop root privilege.
[18-06-08 11:01:16.2000] Plugins::CDplayer::Fork::checkFork (149) Forked task complete, invoking callback
[18-06-08 11:01:16.2039] Plugins::CDplayer::CDhandler::parsetoc (901) ERROR: No tracks were found
[18-06-08 11:01:16.2051] Plugins::CDplayer::CDhandler::processCDTOCResponse (295) Read CD TOC failed  No CD in drive
This is squeezeboxserver id:

Code: Select all

root@DietPi:~# id squeezeboxserver
uid=108(squeezeboxserver) gid=65534(nogroup) groups=65534(nogroup),24(cdrom),27(sudo),29(audio),1000(dietpi)
I also fully grant the icedax:

Code: Select all

root@DietPi:~# ll /usr/bin/icedax
-rwxrwxrwx 1 root root 259312 Jul 27  2014 /usr/bin/icedax
The LMS system info. I download the installer logitechmediaserver_7.9.2_1527861596_arm.deb to use:

Code: Select all

Logitech Media Server Version: 7.9.2 - 1527861596 @ Fri Jun 1 16:17:20 CEST 2018
Hostname: DietPi
Server IP Address: 192.168.1.231
Server HTTP Port Number: 9000
Operating system: Debian - EN - utf8
Platform Architecture: armv7l-linux
Perl Version: 5.24.1 - arm-linux-gnueabihf-thread-multi-64int
Audio::Scan: 0.95
IO::Socket::SSL: 2.044
Database Version: DBD::SQLite 1.34_01 (sqlite 3.7.7.1)
Total Players Recognized: 0
May I know how to enable LMS to run under squeezeboxserver user and access CDplayer?
Post Reply