Sunday, May 5, 2024
 Popular · Latest · Hot · Upcoming
66
rated 0 times [  66] [ 0]  / answers: 1 / hits: 132465  / 3 Years ago, fri, october 29, 2021, 1:27:54

I want to change the mongodb database directory. Some says that I need to change the owner of the new directory to the username that is running mongodb



https://stackoverflow.com/questions/5798549/why-cant-i-start-the-mongodb



How do I know which user is running the mongodb service?



Well I suppose I just look at all the processes and see who own those processes.



How do I see the running processes.



I run the answer and get this. Looks like the user is mongodb. Not ubuntu, not root, but mongodb



root@ip-10-138-30-205:/media/newdrive# ps aux | grep mongodb
mongodb 17140 0.3 5.2 131484 31832 ? Ssl 11:35 0:00 /usr/bin/mongod --config /etc/mongodb.conf
root 17154 0.0 0.1 8096 936 pts/0 S+ 11:38 0:00 grep --color=auto mongodb

More From » process

 Answers
2

Use ps aux | grep mongodb. It returns the processes running in the computer whose name contains mongodb. Search for the mongodb process in that list. The first column has the user who runs the process.


[#35853] Saturday, October 30, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
nuehan

Total Points: 253
Total Questions: 109
Total Answers: 120

Location: Singapore
Member since Sat, Jul 25, 2020
4 Years ago
nuehan questions
Sun, Dec 18, 22, 17:34, 1 Year ago
Mon, Mar 28, 22, 00:10, 2 Years ago
Fri, Jun 24, 22, 11:39, 2 Years ago
Thu, Apr 28, 22, 20:54, 2 Years ago
Fri, Aug 20, 21, 01:06, 3 Years ago
;