Hi,
I’m trying to setup stunnel listening to multiple ports. The PPID of processes created are always root. Can we change that to the right PPID?
Here I can see all the processes by killing 10764 and I expect this is the PPID. But all the children PPID are still 1;
UID PID PPID C STIME TTY TIME CMD philwong 10759 1 0 16:27 pts/78 00:00:00 stunnel self.conf philwong 10760 1 0 16:27 pts/78 00:00:00 stunnel self.conf philwong 10761 1 0 16:27 pts/78 00:00:00 stunnel self.conf philwong 10762 1 0 16:27 pts/78 00:00:00 stunnel self.conf philwong 10763 1 0 16:27 pts/78 00:00:00 stunnel self.conf philwong 10764 1 0 16:27 ? 00:00:00 stunnel self.conf
Regards, Philip
Hi Philip,
use this :
setuid = stunnel4 setgid = stunnel4
where stunnel4 is the name of the user you want the process to be run with.
Regards, Thoms.
On Mon, Apr 2, 2012 at 17:54, Philip Wong hochit@gmail.com wrote:
Hi,
I’m trying to setup stunnel listening to multiple ports. The PPID of processes created are always root. Can we change that to the right PPID?
Here I can see all the processes by killing 10764 and I expect this is the PPID. But all the children PPID are still 1;
UID PID PPID C STIME TTY TIME CMD philwong 10759 1 0 16:27 pts/78 00:00:00 stunnel self.conf philwong 10760 1 0 16:27 pts/78 00:00:00 stunnel self.conf philwong 10761 1 0 16:27 pts/78 00:00:00 stunnel self.conf philwong 10762 1 0 16:27 pts/78 00:00:00 stunnel self.conf philwong 10763 1 0 16:27 pts/78 00:00:00 stunnel self.conf philwong 10764 1 0 16:27 ? 00:00:00 stunnel self.conf
Regards, Philip _______________________________________________ stunnel-users mailing list stunnel-users@stunnel.org http://stunnel.mirt.net/mailman/listinfo/stunnel-users
Hi Thomas,
Thanks for your reply.
Can we set child processes with correct PPID?
Regards, Philip
On 7 Apr, 2012, at 7:42 AM, Thomas Manson wrote:
Hi Philip,
use this :
setuid = stunnel4 setgid = stunnel4
where stunnel4 is the name of the user you want the process to be run with.
Regards, Thoms.
On Mon, Apr 2, 2012 at 17:54, Philip Wong hochit@gmail.com wrote: Hi,
I’m trying to setup stunnel listening to multiple ports. The PPID of processes created are always root. Can we change that to the right PPID?
Here I can see all the processes by killing 10764 and I expect this is the PPID. But all the children PPID are still 1;
UID PID PPID C STIME TTY TIME CMD philwong 10759 1 0 16:27 pts/78 00:00:00 stunnel self.conf philwong 10760 1 0 16:27 pts/78 00:00:00 stunnel self.conf philwong 10761 1 0 16:27 pts/78 00:00:00 stunnel self.conf philwong 10762 1 0 16:27 pts/78 00:00:00 stunnel self.conf philwong 10763 1 0 16:27 pts/78 00:00:00 stunnel self.conf philwong 10764 1 0 16:27 ? 00:00:00 stunnel self.conf
Regards, Philip _______________________________________________ stunnel-users mailing list stunnel-users@stunnel.org http://stunnel.mirt.net/mailman/listinfo/stunnel-users
On Sat, Apr 7, 2012 at 3:38 AM, Philip Wong hochit@gmail.com wrote:
Hi Thomas,
Thanks for your reply.
Can we set child processes with correct PPID?
PPID is the parent process ID number, i.e. the PID of the process that ran you. When I am in bash and run 'ls', the PPID of ls is my bash shell.
This has nothing to do with the userid of any of these processes.
When your PPID is 1 that means that your parent has exited, and you have been inherited by the init process (process ID 1).
Sounds like you killed the parent stunnel process exited but the children continued on because they weren't done handling their requests. This is not abnormal.
Hi Bri,
Right, the PPID of the parent process should be always 1. However, it sounds to me the PPID of the child processes should be the stunnel parent PID. With my example, if I kill PID 10764, all the stunnel processes will be gone. So I expect that's the parent, then the others should have PPID "10764". Isn't it?
UID PID PPID C STIME TTY TIME CMD philwong 10759 1 0 16:27 pts/78 00:00:00 stunnel self.conf philwong 10760 1 0 16:27 pts/78 00:00:00 stunnel self.conf philwong 10761 1 0 16:27 pts/78 00:00:00 stunnel self.conf philwong 10762 1 0 16:27 pts/78 00:00:00 stunnel self.conf philwong 10763 1 0 16:27 pts/78 00:00:00 stunnel self.conf philwong 10764 1 0 16:27 ? 00:00:00 stunnel self.conf
Regards, Philip
On 9 Apr, 2012, at 12:38 AM, Bri Hatch wrote:
On Sat, Apr 7, 2012 at 3:38 AM, Philip Wong hochit@gmail.com wrote:
Hi Thomas,
Thanks for your reply.
Can we set child processes with correct PPID?
PPID is the parent process ID number, i.e. the PID of the process that ran you. When I am in bash and run 'ls', the PPID of ls is my bash shell.
This has nothing to do with the userid of any of these processes.
When your PPID is 1 that means that your parent has exited, and you have been inherited by the init process (process ID 1).
Sounds like you killed the parent stunnel process exited but the children continued on because they weren't done handling their requests. This is not abnormal.
-- Bri Hatch, Systems and Security Engineer. http://www.ifokr.org/bri/
"Quite mad, they say. It is good that Zathras does not mind. He's even grown to like it. Oh yes."
On Sun, Apr 8, 2012 at 11:31 PM, Philip Wong hochit@gmail.com voiced:
However, it sounds to me the PPID of the child processes should be the stunnel parent PID.
Yes, if the stunnel parent is still running.
With my example, if I kill PID 10764, all the stunnel processes will be gone. So I expect that's the parent, then the others should have PPID "10764". Isn't it?
Try 'ps -efH' and you can see the parent/child relationship as a nice indented tree.
I suspect you already killed the parent. All of these are children.
Though it's not a big deal, I feel odd that I can't see the branch in my system... All children look like a self-contained process.
$ ps -efH
philwong 21804 1 0 16:39 pts/15 00:00:00 ./stunnel new.conf philwong 21805 1 0 16:39 pts/15 00:00:00 ./stunnel new.conf philwong 21806 1 0 16:39 pts/15 00:00:00 ./stunnel new.conf philwong 21807 1 0 16:39 pts/15 00:00:00 ./stunnel new.conf philwong 21808 1 0 16:39 pts/15 00:00:00 ./stunnel new.conf philwong 21809 1 0 16:39 ? 00:00:00 ./stunnel new.conf
Philip
On 10 Apr, 2012, at 5:35 AM, Bri Hatch bri@ifokr.org wrote:
On Sun, Apr 8, 2012 at 11:31 PM, Philip Wong hochit@gmail.com voiced:
However, it sounds to me the PPID of the child processes should be the stunnel parent PID.
Yes, if the stunnel parent is still running.
With my example, if I kill PID 10764, all the stunnel processes will be gone. So I expect that's the parent, then the others should have PPID "10764". Isn't it?
Try 'ps -efH' and you can see the parent/child relationship as a nice indented tree.
I suspect you already killed the parent. All of these are children.
-- Bri Hatch, Systems and Security Engineer. http://www.ifokr.org/bri/
"There you go again - you have such a low threshold of 'disaster'." --mathewm