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
48comment = 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
9+ 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
710
811[netbasics]
912comment = 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
13+ paths = /lib/libnss_dns.so.2, /lib64/libnss_dns.so.2, /lib/libnss_mdns*.so.2, /lib/i386-linux-gnu/libnss_dns.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
1214
1315[logbasics]
14- comment = timezone information
15- regularfiles = /etc/localtime
16+ comment = timezone information and log sockets
17+ paths = /etc/localtime
1618need_logsocket = 1
1719
1820[jk_lsh]
1921comment = Jailkit limited shell
20- executables = /usr/sbin/jk_lsh
21- regularfiles = /etc/jailkit/jk_lsh.ini
22+ paths = /usr/sbin/jk_lsh, /etc/jailkit/jk_lsh.ini
2223users = root
2324groups = root
24- need_logsocket = 1
25- includesections = uidbasics
25+ includesections = uidbasics, logbasics
2626
2727[limitedshell]
2828comment = alias for jk_lsh
2929includesections = jk_lsh
3030
3131[cvs]
3232comment = Concurrent Versions System
33- executables = /usr/bin/ cvs
33+ paths = cvs
3434devices = /dev/null
3535
3636[git]
3737comment = Fast Version Control System
38- executables = /usr/bin/git*
39- directories = /usr/share/git-core
40- includesections = editors
38+ paths = /usr/bin/git*, /usr/lib/git-core, /usr/share/git-core, /usr/bin/pager
39+ includesections = editors, perl, netbasics, basicshell, coreutils
4140
4241[scp]
4342comment = ssh secure copy
44- executables = /usr/bin/ scp
43+ paths = scp
4544includesections = netbasics, uidbasics
4645devices = /dev/urandom
4746
4847[sftp]
4948comment = ssh secure ftp
50- executables = /usr/lib/sftp-server, /usr/libexec/openssh/sftp-server, /usr/lib/misc/sftp-server, /usr/libexec/sftp-server
49+ paths = /usr/lib/sftp-server, /usr/libexec/openssh/sftp-server, /usr/lib/misc/sftp-server, /usr/libexec/sftp-server, /usr/lib/openssh /sftp-server
5150includesections = netbasics, uidbasics
5251devices = /dev/urandom, /dev/null
52+ # on solaris
53+ #paths = /usr/lib/ssh/sftp-server
5354
5455[ssh]
5556comment = ssh secure shell
56- executables = /usr/bin/ ssh
57+ paths = ssh
5758includesections = netbasics, uidbasics
58- devices = /dev/urandom, /dev/tty
59+ devices = /dev/urandom, /dev/tty, /dev/null
5960
6061[rsync]
61- executables = /usr/bin/ rsync
62+ paths = rsync
6263includesections = netbasics, uidbasics
6364
6465[procmail]
6566comment = procmail mail delivery
66- executables = /usr/bin/ procmail, /bin/sh
67+ paths = procmail, /bin/sh
6768devices = /dev/null
6869
6970[basicshell]
7071comment = 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
72+ 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
7473users = root
7574groups = root
7675includesections = uidbasics
7776
7877[midnightcommander]
7978comment = 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
79+ paths = mc, mcedit, mcview, /usr/share/mc
80+ includesections = basicshell, terminfo
8381
8482[extendedshell]
8583comment = 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
84+ paths = awk, bzip2, bunzip2, ldd, less, clear, cut, du, find, head, less, md5sum, nice, sort, tac, tail, tr, sort, wc, watch, whoami
8785includesections = basicshell, midnightcommander, editors
8886
87+ [terminfo]
88+ comment = terminfo databases, required for example for ncurses or vim
89+ paths = /etc/terminfo, /usr/share/terminfo, /lib/terminfo
90+
8991[editors]
9092comment = 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
93+ includesections = terminfo
94+ paths = joe, nano, vi, vim, /etc/vimrc, /etc/joe, /usr/share/vim
9495
9596[netutils]
9697comment = 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
98+ paths = wget, lynx, ftp, host, rsync, smbclient
9899includesections = netbasics, ssh, sftp, scp
99- directories = /etc/ssl/certs/
100- regularfiles = /usr/lib/ssl/certs
101100
102101[apacheutils]
103102comment = htpasswd utility
104- executables = /usr/bin/ htpasswd
103+ paths = htpasswd
105104
106105[extshellplusnet]
107106comment = alias for extendedshell + netutils + apacheutils
108107includesections = extendedshell, netutils, apacheutils
109108
110109[openvpn]
111110comment = jail for the openvpn daemon
112- executables = /usr/sbin/openvpn
111+ paths = /usr/sbin/openvpn
113112users = root,nobody
114113groups = root,nogroup
115114devices = /dev/urandom, /dev/random, /dev/net/tun
@@ -118,35 +117,111 @@ need_logsocket = 1
118117
119118[apache]
120119comment = the apache webserver, very basic setup, probably too limited for you
121- executables = /usr/sbin/apache
120+ paths = /usr/sbin/apache
122121users = root, www-data
123122groups = root, www-data
124123includesections = netbasics, uidbasics
125124
126125[perl]
127126comment = the perl interpreter and libraries
128- executables = /usr/bin/perl
129- directories = /usr/lib/perl, /usr/lib/perl5, /usr/share/perl, /usr/share/perl5
127+ paths = perl, /usr/lib/perl, /usr/lib/perl5, /usr/share/perl, /usr/share/perl5
130128
131129[xauth]
132130comment = getting X authentication to work
133- executables = /usr/bin/X11/xauth
134- regularfiles = /usr/X11R6/lib/X11/rgb.txt, /etc/ld.so.conf
131+ paths = /usr/bin/X11/xauth, /usr/X11R6/lib/X11/rgb.txt, /etc/ld.so.conf
135132
136133[xclients]
137134comment = minimal files for X clients
138- regularfiles = /usr/X11R6/lib/X11/rgb.txt
135+ paths = /usr/X11R6/lib/X11/rgb.txt
139136includesections = xauth
140137
141138[vncserver]
142139comment = the VNC server program
143- executables = /usr/bin/Xvnc, /usr/bin/Xrealvnc
144- directories = /usr/X11R6/lib/X11/fonts/
140+ paths = Xvnc, Xrealvnc, /usr/X11R6/lib/X11/fonts/
145141includesections = xclients
146142
143+ [ping]
144+ comment = Ping program
145+ paths_w_setuid = /bin/ping
147146
148147#[xterm]
149148#comment = xterm
150- #executables = /usr/bin/X11/xterm
151- #directories = /usr/share/terminfo, /etc/terminfo
149+ #paths = /usr/bin/X11/xterm, /usr/share/terminfo, /etc/terminfo
152150#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
151+
152+ +# coreutils from:
153+ +# (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
154+
155+ [coreutils]
156+ comment = non-sbin progs from coreutils
157+ 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
158+
159+ [wp]
160+ comment = WordPress Command Line
161+ paths = wp, /usr/local/bin/php
162+ includesections = php, mysql-client
163+
164+ [mysql-client]
165+ comment = mysql client
166+ paths = mysql, mysqldump, mysqlshow, /usr/lib/libmysqlclient.so, /usr/lib/i386-linux-gnu/libmariadb.so.3, /usr/lib/i386-linux-gnu/mariadb19, /usr/lib/x86_64-linux-gnu/libmariadb.so.3, /usr/lib/x86_64-linux-gnu/mariadb19
167+ includesections = netbasics
168+
169+ [composer]
170+ comment = composer
171+ paths = composer, /usr/local/bin/composer, /usr/share/doc/composer
172+ includesections = php, uidbasics, netbasics
173+
174+ [node]
175+ comment = NodeJS
176+ paths = npm, node, nodejs, /usr/lib/nodejs, /usr/share/node-mime, /usr/lib/node_modules, /usr/local/lib/nodejs, /usr/local/lib/node_modules, elmi-to-json, /usr/local/bin/elmi-to-json
177+
178+ [env]
179+ comment = /usr/bin/env for environment variables
180+ paths = env
181+
182+ # Debian 10 default php version is 7.3 (Debian 9 is 7.0)
183+ # Todo: set default version in ISPConfig installer,
184+ # but install the php cli version matching the website
185+ [php]
186+ comment = default php version and libraries
187+ paths = /usr/bin/php
188+ includesections = php_common, php7_3
189+
190+ [php_common]
191+ comment = common php directories and libraries
192+ # notice: potential information leak
193+ # do not add all of /etc/php/ or any of the fpm directories
194+ # or the php config (which includes custom php snippets) from *all*
195+ # sites which use fpm will be copied to *every* jailkit
196+ paths = /usr/bin/php, /usr/lib/php/, /usr/share/php/, /usr/share/zoneinfo/
197+ includesections = env
198+
199+ [php5_6]
200+ comment = php version 5.6
201+ 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/
202+ includesections = php_common
203+
204+ [php7_0]
205+ comment = php version 7.0
206+ 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/
207+ includesections = php_common
208+
209+ [php7_1]
210+ comment = php version 7.1
211+ 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/
212+ includesections = php_common
213+
214+ [php7_2]
215+ comment = php version 7.2
216+ 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/
217+ includesections = php_common
218+
219+ [php7_3]
220+ comment = php version 7.3
221+ 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/
222+ includesections = php_common
223+
224+ [php7_4]
225+ comment = php version 7.4
226+ 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/
227+ includesections = php_common
0 commit comments