1+ # jk_init.ini: jailkit initialization config
2+
3+ # Includes paths to handle Debian 10/9,
4+ # if other paths are needed please create an issue with the details:
5+ # https://git.ispconfig.org/ispconfig/ispconfig3/-/issues
6+
17[uidbasics]
2- # this section probably needs adjustment on 64bit systems
3- # or non-Linux systems
8+ # this section probably needs adjustment non-Linux systems
49comment = common files for all jails that need user/group information
5- libraries = /lib/libnsl.so.1, /lib64/libnsl.so.1, /lib/libnss*.so.2, /lib64/libnss*.so.2, /lib/x86_64-linux-gnu/libnss*.so.2
6- regularfiles = /etc/nsswitch.conf, /etc/ld.so.conf
10+ paths = /lib/libnsl.so.1, /lib64/libnsl.so.1, /lib/libnss*.so.2, /lib64/libnss*.so.2, /lib/i386-linux-gnu/libnsl.so.1, /lib/i386-linux-gnu/libnss*.so.2, /lib/x86_64-linux-gnu/libnsl.so.1, /lib/x86_64-linux-gnu/libnss*.so.2, /lib/arm-linux-gnueabihf/libnss*.so.2, /lib/arm-linux-gnueabihf/libnsl*.so.1, /etc/nsswitch.conf, /etc/ld.so.conf
11+ # Solaris allegedly needs
12+ # paths = /etc/default/nss, /lib/libnsl.so.1, /usr/lib/nss_*.so.1, /etc/nsswitch.conf
713
814[netbasics]
915comment = common files for all jails that need any internet connectivity
10- libraries = /lib/libnss_dns.so.2, /lib64/libnss_dns.so.2, /lib/x86_64-linux-gnu/libnss_dns.so.2
11- regularfiles = /etc/resolv.conf, /etc/host.conf, /etc/hosts, /etc/protocols
16+ paths = /lib/libnss_dns.so.2, /lib64/libnss_dns.so.2, /lib/libnss_mdns*.so.2, /lib/ x86_64-linux-gnu/libnss_dns.so.2, /etc/resolv.conf, /etc/host.conf, /etc/hosts, /etc/protocols, /etc/services, /etc/ssl/certs/, /usr/lib/ssl/certs
17+ # on Solaris devices /dev/udp and /dev/tcp might be needed too, not sure
1218
1319[logbasics]
14- comment = timezone information
15- regularfiles = /etc/localtime
20+ comment = timezone information and log sockets
21+ paths = /etc/localtime
1622need_logsocket = 1
23+ # Solaris allegedly does not need logsocket, but needs
24+ # devices = /dev/log, /dev/conslog
1725
1826[jk_lsh]
1927comment = Jailkit limited shell
20- executables = /usr/sbin/jk_lsh
21- regularfiles = /etc/jailkit/jk_lsh.ini
28+ paths = /usr/sbin/jk_lsh, /etc/jailkit/jk_lsh.ini
2229users = root
2330groups = root
24- need_logsocket = 1
25- includesections = uidbasics
31+ includesections = uidbasics, logbasics
2632
2733[limitedshell]
2834comment = alias for jk_lsh
2935includesections = jk_lsh
3036
3137[cvs]
3238comment = Concurrent Versions System
33- executables = /usr/bin/ cvs
39+ paths = cvs
3440devices = /dev/null
3541
3642[git]
3743comment = Fast Version Control System
38- executables = /usr/bin/git*
39- directories = /usr/share/git-core
40- includesections = editors
44+ paths = /usr/bin/git*, /usr/lib/git-core, /usr/share/git-core, /usr/bin/pager
45+ includesections = editors, perl, netbasics, basicshell, coreutils
4146
4247[scp]
4348comment = ssh secure copy
44- executables = /usr/bin/ scp
49+ paths = scp
4550includesections = netbasics, uidbasics
4651devices = /dev/urandom
4752
4853[sftp]
4954comment = ssh secure ftp
50- executables = /usr/lib/sftp-server, /usr/libexec/openssh/sftp-server, /usr/lib/misc/sftp-server, /usr/libexec/sftp-server
55+ paths = /usr/lib/sftp-server, /usr/libexec/openssh/sftp-server, /usr/lib/misc/sftp-server, /usr/libexec/sftp-server, /usr/lib/openssh /sftp-server
5156includesections = netbasics, uidbasics
5257devices = /dev/urandom, /dev/null
58+ # on solaris
59+ #paths = /usr/lib/ssh/sftp-server
5360
5461[ssh]
5562comment = ssh secure shell
56- executables = /usr/bin/ ssh
63+ paths = ssh
5764includesections = netbasics, uidbasics
58- devices = /dev/urandom, /dev/tty
65+ devices = /dev/urandom, /dev/tty, /dev/null
5966
6067[rsync]
61- executables = /usr/bin/ rsync
68+ paths = rsync
6269includesections = netbasics, uidbasics
6370
6471[procmail]
6572comment = procmail mail delivery
66- executables = /usr/bin/ procmail, /bin/sh
73+ paths = procmail, /bin/sh
6774devices = /dev/null
6875
6976[basicshell]
7077comment = bash based shell with several basic utilities
71- executables = /bin/sh, /bin/bash, /bin/ls, /bin/cat, /bin/chmod, /bin/mkdir, /bin/cp, /bin/cpio, /bin/date, /bin/dd, /bin/echo, /bin/egrep, /bin/false, /bin/fgrep, /bin/grep, /bin/gunzip, /bin/gzip, /bin/ln, /bin/ls, /bin/mkdir, /bin/mktemp, /bin/more, /bin/mv, /bin/pwd, /bin/rm, /bin/rmdir, /bin/sed, /bin/sh, /bin/sleep, /bin/sync, /bin/tar, /bin/touch, /bin/true, /bin/uncompress, /bin/zcat
72- regularfiles = /etc/motd, /etc/issue, /etc/bash.bashrc, /etc/bashrc, /etc/profile
73- directories = /usr/lib/locale/en_US.utf8
78+ paths = /bin/sh, bash, ls, cat, chmod, mkdir, cp, cpio, date, dd, echo, egrep, false, fgrep, grep, gunzip, gzip, ln, ls, mkdir, mktemp, more, mv, pwd, rm, rmdir, sed, sh, sleep, sync, tar, touch, true, uncompress, zcat, /etc/motd, /etc/issue, /etc/bash.bashrc, /etc/bashrc, /etc/profile, /usr/lib/locale/en_US.utf8, uname, expr, xargs
7479users = root
7580groups = root
7681includesections = uidbasics
7782
7883[midnightcommander]
7984comment = Midnight Commander
80- executables = /usr/bin/mc, /usr/bin/mcedit, /usr/bin/mcview
81- directories = /etc/terminfo, /usr/share/terminfo, /usr/share/mc
82- includesections = basicshell
85+ paths = mc, mcedit, mcview, /usr/share/mc
86+ includesections = basicshell, terminfo
8387
8488[extendedshell]
8589comment = bash shell including things like awk, bzip, tail, less
86- executables = /usr/bin/ awk, /usr/bin/ bzip2, /usr/bin/ bunzip2, /usr/bin/ ldd, /usr/bin/ less, /usr/bin/ clear, /usr/bin/ cut, /usr/bin/ du, /usr/bin/ find, /usr/bin/ head, /usr/bin/ less, /usr/bin/ md5sum, /usr/bin/ nice, /usr/bin/ sort, /usr/bin/ tac, /usr/bin/ tail, /usr/bin/ tr, /usr/bin/ sort, /usr/bin/ wc, /usr/bin/ watch, /usr/bin/ whoami
90+ paths = awk, bzip2, bunzip2, ldd, less, clear, cut, du, find, head, less, md5sum, nice, sort, tac, tail, tr, sort, wc, watch, whoami
8791includesections = basicshell, midnightcommander, editors
8892
93+ [terminfo]
94+ comment = terminfo databases, required for example for ncurses or vim
95+ paths = /etc/terminfo, /usr/share/terminfo, /lib/terminfo
96+
8997[editors]
9098comment = vim, joe and nano
91- executables = /usr/bin/joe, /usr/bin/nano, /usr/bin/vi, /usr/bin/vim, /usr/bin/pico
92- regularfiles = /etc/vimrc
93- directories = /etc/joe, /etc/terminfo, /usr/share/vim, /usr/share/terminfo, /lib/terminfo
99+ includesections = terminfo
100+ paths = joe, nano, vi, vim, /etc/vimrc, /etc/joe, /usr/share/vim
94101
95102[netutils]
96103comment = several internet utilities like wget, ftp, rsync, scp, ssh
97- executables = /usr/bin/ wget, /usr/bin/ lynx, /usr/bin/ ftp, /usr/bin/ host, /usr/bin/ rsync, /usr/bin/ smbclient
104+ paths = wget, lynx, ftp, host, rsync, smbclient
98105includesections = netbasics, ssh, sftp, scp
99- directories = /etc/ssl/certs/
100- regularfiles = /usr/lib/ssl/certs
101106
102107[apacheutils]
103108comment = htpasswd utility
104- executables = /usr/bin/ htpasswd
109+ paths = htpasswd
105110
106111[extshellplusnet]
107112comment = alias for extendedshell + netutils + apacheutils
108113includesections = extendedshell, netutils, apacheutils
109114
110115[openvpn]
111116comment = jail for the openvpn daemon
112- executables = /usr/sbin/openvpn
117+ paths = /usr/sbin/openvpn
113118users = root,nobody
114119groups = root,nogroup
115120devices = /dev/urandom, /dev/random, /dev/net/tun
@@ -118,35 +123,92 @@ need_logsocket = 1
118123
119124[apache]
120125comment = the apache webserver, very basic setup, probably too limited for you
121- executables = /usr/sbin/apache
126+ paths = /usr/sbin/apache
122127users = root, www-data
123128groups = root, www-data
124129includesections = netbasics, uidbasics
125130
126131[perl]
127132comment = the perl interpreter and libraries
128- executables = /usr/bin/perl
129- directories = /usr/lib/perl, /usr/lib/perl5, /usr/share/perl, /usr/share/perl5
133+ paths = perl, /usr/lib/perl, /usr/lib/perl5, /usr/share/perl, /usr/share/perl5
130134
131135[xauth]
132136comment = getting X authentication to work
133- executables = /usr/bin/X11/xauth
134- regularfiles = /usr/X11R6/lib/X11/rgb.txt, /etc/ld.so.conf
137+ paths = /usr/bin/X11/xauth, /usr/X11R6/lib/X11/rgb.txt, /etc/ld.so.conf
135138
136139[xclients]
137140comment = minimal files for X clients
138- regularfiles = /usr/X11R6/lib/X11/rgb.txt
141+ paths = /usr/X11R6/lib/X11/rgb.txt
139142includesections = xauth
140143
141144[vncserver]
142145comment = the VNC server program
143- executables = /usr/bin/Xvnc, /usr/bin/Xrealvnc
144- directories = /usr/X11R6/lib/X11/fonts/
146+ paths = Xvnc, Xrealvnc, /usr/X11R6/lib/X11/fonts/
145147includesections = xclients
146148
149+ [ping]
150+ comment = Ping program
151+ paths_w_setuid = /bin/ping
147152
148153#[xterm]
149154#comment = xterm
150- #executables = /usr/bin/X11/xterm
151- #directories = /usr/share/terminfo, /etc/terminfo
155+ #paths = /usr/bin/X11/xterm, /usr/share/terminfo, /etc/terminfo
152156#devices = /dev/pts/0, /dev/pts/1, /dev/pts/2, /dev/pts/3, /dev/pts/4, /dev/ptyb4, /dev/ptya4, /dev/tty, /dev/tty0, /dev/tty4
157+
158+ +# coreutils from:
159+ +# (echo -ne '\n[coreutils]\ncomment = non-sbin progs from coreutils\npaths = '; dpkg --listfiles coreutils | grep -E '^/bin/|/usr/bin/' | xargs -n1 -i@ echo -n "@, " | sed -e 's/, *$/\n/g' -e 's|/usr/bin/||g' -e 's|/bin/||g') >> /etc/jailkit/jk_init.ini
160+
161+ [coreutils]
162+ comment = non-sbin progs from coreutils
163+ paths = cat, chgrp, chmod, chown, cp, date, dd, df, dir, echo, false, ln, ls, mkdir, mknod, mktemp, mv, pwd, readlink, rm, rmdir, sleep, stty, sync, touch, true, uname, vdir, [, arch, b2sum, base32, base64, basename, chcon, cksum, comm, csplit, cut, dircolors, dirname, du, env, expand, expr, factor, fmt, fold, groups, head, hostid, id, install, join, link, logname, md5sum, mkfifo, nice, nl, nohup, nproc, numfmt, od, paste, pathchk, pinky, pr, printenv, printf, ptx, realpath, runcon, seq, sha1sum, sha224sum, sha256sum, sha384sum, sha512sum, shred, shuf, sort, split, stat, stdbuf, sum, tac, tail, tee, test, timeout, tr, truncate, tsort, tty, unexpand, uniq, unlink, users, wc, who, whoami, yes, md5sum.textutils
164+
165+ [env]
166+ comment = /usr/bin/env for environment variables
167+ paths = env
168+
169+ # Debian 10 default php version is 7.3 (Debian 9 is 7.0)
170+ # Todo: set default version in ISPConfig installer,
171+ # but install the php cli version matching the website
172+ [php]
173+ comment = default php version and libraries
174+ paths = /usr/bin/php
175+ includesections = php_common, php7_3
176+
177+ [php_common]
178+ comment = common php directories and libraries
179+ # notice: potential information leak
180+ # do not add all of /etc/php/ or any of the fpm directories
181+ # or the php config (which includes custom php snippets) from *all*
182+ # sites which use fpm will be copied to *every* jailkit
183+ paths = /usr/bin/php, /usr/lib/php/, /usr/share/php/, /usr/share/zoneinfo/
184+ includesections = env
185+
186+ [php5_6]
187+ comment = php version 5.6
188+ paths = /usr/bin/php5.6, /usr/lib/php/5.6/, /usr/lib/php/20131226/, /usr/share/php/5.6/, /etc/php/5.6/cli/, /etc/php/5.6/mods-available/
189+ includesections = php_common
190+
191+ [php7_0]
192+ comment = php version 7.0
193+ paths = /usr/bin/php7.0, /usr/lib/php/7.0/, /usr/lib/php/20151012/, /usr/share/php/7.0/, /etc/php/7.0/cli/, /etc/php/7.0/mods-available/
194+ includesections = php_common
195+
196+ [php7_1]
197+ comment = php version 7.1
198+ paths = /usr/bin/php7.1, /usr/lib/php/7.1/, /usr/lib/php/20160303/, /usr/share/php/7.1/, /etc/php/7.1/cli/, /etc/php/7.1/mods-available/
199+ includesections = php_common
200+
201+ [php7_2]
202+ comment = php version 7.2
203+ paths = /usr/bin/php7.2, /usr/lib/php/7.2/, /usr/lib/php/20170718/, /usr/share/php/7.2/, /etc/php/7.2/cli/, /etc/php/7.2/mods-available/
204+ includesections = php_common
205+
206+ [php7_3]
207+ comment = php version 7.3
208+ paths = /usr/bin/php7.3, /usr/lib/php/7.3/, /usr/lib/php/20180731/, /usr/share/php/7.3/, /etc/php/7.3/cli/, /etc/php/7.3/mods-available/
209+ includesections = php_common
210+
211+ [php7_4]
212+ comment = php version 7.4
213+ paths = /usr/bin/php7.4, /usr/lib/php/7.4/, /usr/lib/php/20190902/, /usr/share/php/7.4/, /etc/php/7.4/cli/, /etc/php/7.4/mods-available/
214+ includesections = php_common
0 commit comments