mongod
user is created on the system during installation and all of the appropriate files are created and owned by the mongod
user.
Can we change the default owner of mongodb to other than 'mongod' user ?
Where to change ?
One of the Government Client wants to change as to tighten security.
Please share your ideas.
Best Answer
Yes! In /usr/lib/systemd/system/mongod.service. Changing
User
parameter value to wanted user name. Remember to changeGroup
too and thenchown -R
all files and directories to that new user.