Score:1

How can I install application as root and start and stop it as non root?

bt flag

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!

Romeo Ninov avatar
in flag
Have you consider usage of `sudo`?
in flag
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)
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.