jailkit-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Jailkit-users] Jailkit + Apache 2.4


From: vigri_mailinglists
Subject: [Jailkit-users] Jailkit + Apache 2.4
Date: Tue, 17 Nov 2015 18:24:21 +0100 (CET)

Hello,

I'm trying to use Apache 2.4 in combination with Jailkit.
Unfortunately without luck.


/etc/jailkit/jk_init.ini:
[apache_new]
comment = apache webserver
executables = /usr/sbin/apache2, /usr/sbin/apache2ctl, /etc/init.d/apache2, 
/bin/sh, /usr/b$
directories = /etc/apache2, /var/www/html, /var/log/apache2, /var/lock/subsys, 
/usr/share/a$
libraries = /lib/libnsl.so.1, /lib64/libnsl.so.1, /lib/libnss*.so.2, 
/lib64/libnss*.so.2
users = root, www-data
groups = root, www-data
#includesections = netbasics, uidbasics
devices = /dev/urandom, /dev/null

- a supplementary question: Why does root have to be here?

****************************

My steps on debian 8.2:
(everything as root)

modify /etc/apache2/envvars:
apache_env_user = apache10
apache_run_group = apache10

useradd apache10  (for every try I've invremented the number. You see, I'm at 
ten now ;) )
mkdir /home/jails/apache10
chown root:root /home/jails/apache10
chmod 755 /home/jails/apache10

jk_init -j /home/jails/apache10 apache_new


jk_jailuser -j /home/jails/apache10 -m apache10
result: invalid shell, /home/jails/apache10/usr/sbin/jk_lsh does not exist

Workaround for me (hope this is the right way)
jk_cp -j /home/jails/apache11 /usr/sbin/jk_lsh
/usr/sbin/jk_lsh to /home/jails/apache11/usr/sbin/jk_lsh

again: jk_jailuser -j /home/jails/apache10 -m apache10
result: home directory /home/apache10 does not exist, nothing moved
- but this should be okay

now I'm trying to start apache
command: jk_chrootlaunch -j /home/jails/apache10 -x /usr/sbin/apache2ctl -- 
start
result:
/usr/sbin/apache2ctl: 1: /usr/sbin/apache2ctl: id: not found
/usr/sbin/apache2ctl: 86: [: -eq: unexpected operator
/usr/sbin/apache2ctl: 114: /usr/sbin/apache2ctl: mktemp: not found
/usr/sbin/apache2ctl: 115: /usr/sbin/apache2ctl: chmod: not found


The mktemp and chmod - errors should be easy to fix with jk_cp, but what about 
the first two errors?
Is there something I'm missing?

It would really be great if there would be a how-to on the project webpage for 
apache.

Best regards and thanks in advance.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]