Error when running pulp-manage-db: “This must not be run as root”
Issue
- Unable to run pulp-manage-db command.
It results in the following error:
pulp-manage-db This must not be run as root, but as the same user apache runs as.
Resolution
The command needs to be executed in the following manner:
# sudo -u apache pulp-manage-db
Important: run that command ONLY when pulp services are stopped. In particular, run:
for i in pulp_resource_manager pulp_workers pulp_celerybeat pulp_streamer; do service $i stop; done
before the pulp-manage-db
and start the services after the command completes.