dev-db/mongodb-2.6.1 (~) starts as root although it should be running as mongodb:mongodb as indicated in the conf.d script: # - user : the user used to run your mongodb instance (default : mongodb) # - group : the group used to run your mongodb instance (default : mongodb) According to an echo in the init.d script $user and $group are set propertly. Not sure where the bug is. Maybe in runscript assuming that's what provides the start function if there's none in the init script? Reproducible: Always Steps to Reproduce: 1. Install mongodb 2.6 2. Start it
Right now I'm using this workaround to get it running as the correct user: start() { ebegin "Starting MongoDB" start-stop-daemon --start --user "${user}" --group "${group}" --exec "${command}" -- ${command_args} --fork --pidfilepath "${pidfile}" return $? }
thanks mate, it's fixed in tree now +*mongodb-2.6.1-r1 (26 May 2014) + + 26 May 2014; Ultrabug <ultrabug@gentoo.org> -mongodb-2.6.1.ebuild, + +mongodb-2.6.1-r1.ebuild, files/mms-agent.initd-r2, files/mongodb.initd-r2, + files/mongos.initd-r2: + fix init script user and group execution +