Is it recommended to set MARKLOGIC_USER from the default daemon to a named user?

Viewed 19

By default, after Marklogic default installation on Centos, ML will starts under daemon user.

Everything works fine. Except that I could not make DB backup.

Permission Deneied

After research, I found below KB. https://docs.marklogic.com/guide/installation/procedures#id_32108

I wonder whether it is recommended to always set up MARKLOGIC_USER to a named user for Linux Installation.

I guess running ML in production, ease of ML upgrade should be important.

1 Answers

Whether or not to run the MarkLogic process as the default daemon or a different specified user is a matter of preference. Though, it is generally considered a best practice to run applications and services a specified user.

https://refspecs.linuxbase.org/LSB_3.1.1/LSB-Core-generic/LSB-Core-generic/usernames.html

The daemon User ID/Group ID was used as an unprivileged User ID/Group ID for daemons to execute under in order to limit their access to the system. Generally daemons should now run under individual User ID/Group IDs in order to further partition daemons from one another.

Though, the daemon user is provided by default. If you configure MarkLogic to run as a different user, you need to ensure that user is created and provisioned properly.

The error that you encountered when running the backup was because the daemon user didn't have permission to create the backup directory.

You can address that by adjusting the filesystem permissions and continue to run the MarkLogic process as daemon. If you choose to run the process as a different user, you still need to ensure that the chosen user has the necessary permissions to create files and directories in order to perform a backup.

Related