I have a script which will install mysql server, java and then my java application. I want to create a test user and group testg, the application will start and stop by non-root user (here test user) however the installation will be done as root user. example: service mysqld start/stop will be run as non root user.
I am using centos 8 machine. Is there any way it can be achieved. I tried to give permissions to all files as test:testg.
Thanks in advance!