I'm having trouble getting the QuickBuild service to run as the non-root user I specified in RUN_AS_USER in the agent.sh script. The service is installed using systemd running on Red Hat 8.1.
The service itself runs as expected on startup, but the QuickBuild dashboard isn't picking up the correct System Attributes (Path and other environment variables). This makes me suspect it isn't running as the correct user, the PATH displayed matches root's $PATH.
When I manually stop the QuickBuild service and run "sudo ./agent.sh console" as the specified user, everything works as I'd expect and the proper System Attributes are displayed. Running the service manually as that same user produces the incorrect results.
I've tried quite a few things: gave the user sudo with no password, ensured the QuickBuild files and folders are all owned by the user, but am having no luck.
When I run "systemctl status quickbuild" I see the line: TTY=unknown ; PWD=/opt/QuickBuild/bin ; USER=root ; COMMAND=/bin/cat /var/lib/waagent/ovf-env.xml
I noticed references to this xml file in: https://wiki.pmease.com/display/qb90/Launch+Node+in+Azure
I don't have the directory /var/lib/waagent on my machine, would this cause any issues? Is there anything else that I may be missing to get the service to run as a non-root user?
- solved #4
- replies 4
- views 76
- stars 0