Preset MongoDB UID & GID

164 views
Skip to first unread message

Laurik Singh

unread,
Aug 16, 2018, 2:25:39 AM8/16/18
to mongodb-user
Hi,

I am looking to find any recommendations about setting the 'mongod' user UID & GID during the install and configuration. 

We are having issues with permissions while using common NFS mounts (typically for backups) across multiple MongoDB servers where there are often mismatches in the mongod UID & GID on servers. Therefore, we are looking for a way to standardize our MongoDB build by presetting the mongod UID and GID during the setup. 

Our standard build uses installs via yum on CentOS machines. 

Please advise.

Thanks,
Laurik


lian....@mongodb.com

unread,
Sep 9, 2018, 7:53:08 PM9/9/18
to mongodb-user

Hi Laurik,

When installing via downloadable RPM or the MongoDB yum repositories, the “mongod“ username will always be used and it will attempt to set its UID/GID to 184 by default. If the reserved UID/GID is already taken, it will assign the next available UID/GID. The mongod UID/GID is not configurable during the installation setup.


To standardize your MongoDB build in your environment, the workaround is to manually create the mongod user with your UID/GID preference on the server before installation.


Regards,

Lian

Laurik Singh

unread,
Sep 11, 2018, 2:21:56 AM9/11/18
to mongodb-user
Thanks Lian! I'll give it a try. 
Reply all
Reply to author
Forward
0 new messages