I have userA and userB who start processes:
userA@server:~$ ./some_command.sh &
[1] 30889
I then have a web app running as userC that manages those processes (suspending, resuming, terminating, and killing).
How can I give permission to userC to do this? For security I want to avoid giving userC root privilege.
I have complete control over userC. One possibility is changing the user ID to same as userA, but then what about userB?
Update: Process management is performed with a third party module so could not apply sudo without a significant rewrite.