Hello, I'm not a FreeBSD newb, but I'm new to jails, and read different solutions. I tried to build a jail with a webserver. Now I could start it. Then I wonder that are different outputs with these commands after I had start it:
but with this way, it shows nothing is running:
I think I do something wrong. I could imagine that with the second way I created a new process and in that is nothing until I do some. But "tcsh" on the host and "ps -ax" give me the same output what is running.
The simple question is, what is the recommended way to connect to jail and work in it?
jexec 57 ps -ax
gives me something like this
Code:
PID TT STAT TIME COMMAND
1220 - IJ 0:00,02 /usr/local/sbin/httpd -DSSL -DNOHTTPACCEPT
6153 - IsJ 0:00,01 /usr/sbin/syslogd -ss
0132 - IsJ 0:00,01 /usr/sbin/cron -s
8328 - IsJ 0:00,00 /usr/sbin/sshd
9702 - SsJ 0:00,03 sendmail: accepting connections (sendmail)
0406 - IsJ 0:00,00 sendmail: Queue runner@00:30:00 for /var/spool/clientmqueue (sendmail)
5848 - SsJ 0:00,16 /usr/local/sbin/httpd -DSSL -DNOHTTPACCEPT
7002 - IJ 0:00,01 /usr/local/sbin/rotatelogs -f /var/log/httpd.d/httpd-error-%Y-%m-%d_%H-%M-%S.log 1M
7125 - IJ 0:00,01 /usr/local/sbin/rotatelogs -f /var/log/httpd.d/httpd-ssl-error-%Y-%m-%d_%H-%M-%S.log 1M
7947 - IJ 0:00,00 /usr/local/sbin/rotatelogs -l /var/log/httpd.d/httpd-access-%Y-%m.log 5M
9157 - IJ 0:00,01 /usr/local/sbin/rotatelogs -f /var/log/httpd.d/httpd-ssl-access-%Y-%m.log 5M
9947 - IJ 0:00,00 /usr/local/sbin/httpd -DSSL -DNOHTTPACCEPT
0076 - IJ 0:00,00 /usr/local/sbin/httpd -DSSL -DNOHTTPACCEPT
0634 - IJ 0:00,03 /usr/local/sbin/httpd -DSSL -DNOHTTPACCEPT
1067 - IJ 0:00,03 /usr/local/sbin/httpd -DSSL -DNOHTTPACCEPT
1346 - IJ 0:00,01 /usr/local/sbin/httpd -DSSL -DNOHTTPACCEPT
Code:
jail "/path/to/jail" jailname IP.IP.IP.IP /bin/tcsh
jail>ps -ax
PID TT STAT TIME COMMAND
228 0 SJ 0:00,04 /bin/tcsh
302 0 R+J 0:00,00 ps -ax
jail>id
uid=0(root) gid=0(wheel) groups=0(wheel),5(operator)
I think I do something wrong. I could imagine that with the second way I created a new process and in that is nothing until I do some. But "tcsh" on the host and "ps -ax" give me the same output what is running.
The simple question is, what is the recommended way to connect to jail and work in it?
jail
jexec
ssh "to jail"
from host.