LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   Music Player Deamon - running as multimedia (https://www.linuxquestions.org/questions/linux-security-4/music-player-deamon-running-as-multimedia-280774/)

iskrem 01-22-2005 04:53 AM

Music Player Deamon - running as multimedia / security related.
 
In the Mpd config file it is recommended to run the deamon as a non-privelegied account. I made a mpdplayer account, but I realize that I need to change permissions on a bunch of files including the/var/lib directorie.

Is this correct? Should I really change permissions to /var/lib directorie? Or is there another way of doing this?

HolyCoitus 01-22-2005 09:44 AM

You can create a directory for the playlists and the error logs that is not in /var/. I use /usr/share/mpd for mine, which is the default on Gentoo.

Code:

port "6600"
music_directory "/mnt/temp/music"
playlist_directory "/usr/share/mpd/playlists"
log_file "/usr/share/mpd/mpd.log"
error_file "/usr/share/mpd/error.log"
user "mpd"

That's what my mpd.conf looks like. The logging doesn't go through syslog, so it isn't that big of a problem. The only issue I had was making it so that mpd could access the sound devices. I definitely wouldn't run mpd on a multiuser box that has ssh access from people who may enjoy playing pranks. Heh.

iskrem 01-22-2005 10:55 AM

But I still have to give this user write privelegies to /usr/share? Wouldn't that be the same as giving write permissions to /var/lib?

I will only give this particular user access to the service and I will password protect it somehow.

HolyCoitus 01-22-2005 06:20 PM

You only have to give the user access to the directory, not the root directory. of it. So you would just have /usr/share setup normally and create a subdirectory under it allowing the user for mpd write access.

iskrem 01-23-2005 05:09 AM

I made a group multimedia, neverthless I forgot to give my user multimedia group access to multimedia. So it works now.

Thanks a lot.

iskrem 01-23-2005 02:35 PM

You were saying something about granting access to audio devices as this user.

I made a group audio and give it access a group to /dev/dsp, /dev/mixer and /dev/snd/*. Then I added the user group access to audio. Is this a good solution?

And last: In system-config-users in Fedora Core 2 you can choose primary group, what is this?


All times are GMT -5. The time now is 04:21 PM.