can we do the following on *NIX.
Create following folder structure.
/<parent folder>/<child folder 1> /<parent folder>/<child folder 2> /<parent folder>/<child folder 3> /<parent folder>/<child folder 4> where <parent folder> is owned by master user, and .... <child folder 1> is owned by user 1, <child folder 2> is owned by user 2, <child folder 3> is owned by user 3, <child folder 4> is owned by user 4.
Processes' binaries saved under the child folders are started by the respective child folder owners.
/<parent folder>/<child folder 2>/<process binary> is started by user 2. Say the process started has a PID of 3897.
Both the individual users and the master user can kill the child processes.
kill 3897 can be done by either master user or user 2, but not user 1, user 3, and user 4.
Yes.
Assuming by 'master user' you mean root, that's how things work by default. If you mean something other than root, then you'll need to set up access for that user to run kill as the other users with a tool like sudo.
/home is owned by root, the individual users' home directories are owned by that individual under /home.
The owner of a process and root can kill that process.
I think I have found the answer. It requires us to write a script to kill these processes and then chmod this script to be executable only by "root". Then add a line in the sudoer file so that the "master user" can call this script and execute as "root".