Get.dgraph.io fails for non-priv user on rhel8

Report a Dgraph Bug

What version of Dgraph are you using?

v20.07.0

Have you tried reproducing the issue with the latest release?

yes, v20.07.0

What is the hardware spec (RAM, OS)?

  • AWS = t2.micro running Red Hat Enterprise Linux 8.2 (Ootpa)
  • GCP = f1-micro running CentOS Linux 8 (Core)

Steps to reproduce the issue (command/config used to run Dgraph).

$ curl -sSf https://get.dgraph.io | ACCEPT_LICENSE="y" INSTALL_IN_SYSTEMD="y" bash

Expected behavior and actual result.

The installation fails from non-priv user, as dgraph user was not created.

The final output is:

Download complete.
Inflating binaries (password may be required).
Dgraph binaries v20.07.0 have been installed successfully in /usr/local/bin.
Please visit https://dgraph.io/docs/get-started for further instructions on usage.
Systemd installation was requested.
chown: invalid user: ‘dgraph:dgraph’
There was some problem while installing Dgraph. Please share the output of this script with us on https://dgraph.slack.com or http://discuss.dgraph.io so that we can resolve the issue for you.

As priv user, it works fine.