1

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!

  • 1
    Have you consider usage of `sudo`? – Romeo Ninov Nov 15 '22 at 07:32
  • Does this answer your question? [systemd: Grant an unprivileged user permission to alter one specific service](https://serverfault.com/questions/841099/systemd-grant-an-unprivileged-user-permission-to-alter-one-specific-service) – Gerald Schneider Nov 15 '22 at 07:51

0 Answers0