Skip to content

Commit 7960a79

Browse files
committed
For convenience, create a .my.cnf for jailed shell users
2 parents 0e32470 + bcb8eb1 commit 7960a79

208 files changed

Lines changed: 1495 additions & 1392 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
File renamed without changes.

server/plugins-available/nginx_reverseproxy_plugin.inc.php renamed to docs/old_server_plugins/nginx_reverseproxy_plugin.inc.php

File renamed without changes.
Lines changed: 240 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,240 @@
1+
<?php
2+
3+
/*
4+
Copyright (c) 2024, Till Brehm, ISPConfig UG
5+
All rights reserved.
6+
7+
Redistribution and use in source and binary forms, with or without modification,
8+
are permitted provided that the following conditions are met:
9+
10+
* Redistributions of source code must retain the above copyright notice,
11+
this list of conditions and the following disclaimer.
12+
* Redistributions in binary form must reproduce the above copyright notice,
13+
this list of conditions and the following disclaimer in the documentation
14+
and/or other materials provided with the distribution.
15+
* Neither the name of ISPConfig nor the names of its contributors
16+
may be used to endorse or promote products derived from this software without
17+
specific prior written permission.
18+
19+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
20+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
22+
IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
23+
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
24+
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
26+
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
27+
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
28+
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29+
*/
30+
31+
//*** Ubuntu 24.04 default settings
32+
33+
//* Main
34+
$conf['language'] = 'en';
35+
$conf['distname'] = 'ubuntu2404';
36+
$conf['hostname'] = 'server1.domain.tld'; // Full hostname
37+
$conf['ispconfig_install_dir'] = '/usr/local/ispconfig';
38+
$conf['ispconfig_config_dir'] = '/usr/local/ispconfig';
39+
$conf['ispconfig_log_priority'] = 2; // 0 = Debug, 1 = Warning, 2 = Error
40+
$conf['ispconfig_log_dir'] = '/var/log/ispconfig';
41+
$conf['server_id'] = 1;
42+
$conf['init_scripts'] = '/etc/init.d';
43+
$conf['runlevel'] = '/etc';
44+
$conf['shells'] = '/etc/shells';
45+
$conf['pam'] = '/etc/pam.d';
46+
$conf['default_php'] = "8.3";
47+
48+
//* Services provided by this server, this selection will be overridden by the expert mode
49+
$conf['services']['mail'] = true;
50+
$conf['services']['web'] = true;
51+
$conf['services']['dns'] = true;
52+
$conf['services']['file'] = true;
53+
$conf['services']['db'] = true;
54+
$conf['services']['vserver'] = true;
55+
$conf['services']['proxy'] = false;
56+
$conf['services']['firewall'] = false;
57+
58+
//* MySQL
59+
$conf['mysql']['installed'] = false; // will be detected automatically during installation
60+
$conf['mysql']['init_script'] = 'mysql';
61+
$conf['mysql']['host'] = 'localhost';
62+
$conf['mysql']['ip'] = '127.0.0.1';
63+
$conf['mysql']['port'] = '3306';
64+
$conf['mysql']['database'] = 'dbispconfig';
65+
$conf['mysql']['admin_user'] = 'root';
66+
$conf['mysql']['admin_password'] = '';
67+
$conf['mysql']['charset'] = 'utf8';
68+
$conf['mysql']['ispconfig_user'] = 'ispconfig';
69+
$conf['mysql']['ispconfig_password'] = md5(random_bytes(20));
70+
$conf['mysql']['master_slave_setup'] = 'n';
71+
$conf['mysql']['master_host'] = '';
72+
$conf['mysql']['master_port'] = '3306';
73+
$conf['mysql']['master_database'] = 'dbispconfig';
74+
$conf['mysql']['master_admin_user'] = 'root';
75+
$conf['mysql']['master_admin_password'] = '';
76+
$conf['mysql']['master_ispconfig_user'] = '';
77+
$conf['mysql']['master_ispconfig_password'] = md5(random_bytes(20));
78+
79+
//* Apache
80+
$conf['apache']['installed'] = false; // will be detected automatically during installation
81+
$conf['apache']['user'] = 'www-data';
82+
$conf['apache']['group'] = 'www-data';
83+
$conf['apache']['init_script'] = 'apache2';
84+
$conf['apache']['version'] = '2.4';
85+
$conf['apache']['vhost_conf_dir'] = '/etc/apache2/sites-available';
86+
$conf['apache']['vhost_conf_enabled_dir'] = '/etc/apache2/sites-enabled';
87+
$conf['apache']['vhost_port'] = '8080';
88+
$conf['apache']['php_ini_path_apache'] = '/etc/php/8.3/apache2/php.ini';
89+
$conf['apache']['php_ini_path_cgi'] = '/etc/php/8.3/cgi/php.ini';
90+
91+
//* Website base settings
92+
$conf['web']['website_basedir'] = '/var/www';
93+
$conf['web']['website_path'] = '/var/www/clients/client[client_id]/web[website_id]';
94+
$conf['web']['website_symlinks'] = '/var/www/[website_domain]/:/var/www/clients/client[client_id]/[website_domain]/';
95+
96+
//* Apps base settings
97+
$conf['web']['apps_vhost_ip'] = '_default_';
98+
$conf['web']['apps_vhost_port'] = '8081';
99+
$conf['web']['apps_vhost_servername'] = '';
100+
$conf['web']['apps_vhost_user'] = 'ispapps';
101+
$conf['web']['apps_vhost_group'] = 'ispapps';
102+
103+
//* Fastcgi
104+
$conf['fastcgi']['fastcgi_phpini_path'] = '/etc/php/8.3/cgi/';
105+
$conf['fastcgi']['fastcgi_starter_path'] = '/var/www/php-fcgi-scripts/[system_user]/';
106+
$conf['fastcgi']['fastcgi_bin'] = '/usr/bin/php-cgi';
107+
108+
//* Postfix
109+
$conf['postfix']['installed'] = false; // will be detected automatically during installation
110+
$conf['postfix']['config_dir'] = '/etc/postfix';
111+
$conf['postfix']['init_script'] = 'postfix';
112+
$conf['postfix']['user'] = 'postfix';
113+
$conf['postfix']['group'] = 'postfix';
114+
$conf['postfix']['vmail_userid'] = '5000';
115+
$conf['postfix']['vmail_username'] = 'vmail';
116+
$conf['postfix']['vmail_groupid'] = '5000';
117+
$conf['postfix']['vmail_groupname'] = 'vmail';
118+
$conf['postfix']['vmail_mailbox_base'] = '/var/vmail';
119+
120+
//* Mailman
121+
$conf['mailman']['installed'] = false; // will be detected automatically during installation
122+
$conf['mailman']['config_dir'] = '/etc/mailman';
123+
$conf['mailman']['init_script'] = 'mailman';
124+
125+
//* Getmail
126+
$conf['getmail']['installed'] = false; // will be detected automatically during installation
127+
$conf['getmail']['config_dir'] = '/etc/getmail';
128+
$conf['getmail']['program'] = '/usr/bin/getmail';
129+
130+
//* Courier
131+
$conf['courier']['installed'] = false; // will be detected automatically during installation
132+
$conf['courier']['config_dir'] = '/etc/courier';
133+
$conf['courier']['courier-authdaemon'] = 'courier-authdaemon';
134+
$conf['courier']['courier-imap'] = 'courier-imap';
135+
$conf['courier']['courier-imap-ssl'] = 'courier-imap-ssl';
136+
$conf['courier']['courier-pop'] = 'courier-pop';
137+
$conf['courier']['courier-pop-ssl'] = 'courier-pop-ssl';
138+
139+
//* Dovecot
140+
$conf['dovecot']['installed'] = false; // will be detected automatically during installation
141+
$conf['dovecot']['config_dir'] = '/etc/dovecot';
142+
$conf['dovecot']['init_script'] = 'dovecot';
143+
144+
//* SASL
145+
$conf['saslauthd']['installed'] = false; // will be detected automatically during installation
146+
$conf['saslauthd']['config'] = '/etc/default/saslauthd';
147+
$conf['saslauthd']['init_script'] = 'saslauthd';
148+
149+
//* Amavisd
150+
$conf['amavis']['installed'] = false; // will be detected automatically during installation
151+
$conf['amavis']['config_dir'] = '/etc/amavis';
152+
$conf['amavis']['init_script'] = 'amavis';
153+
154+
//* Rspamd
155+
$conf['rspamd']['installed'] = false; // will be detected automatically during installation
156+
$conf['rspamd']['config_dir'] = '/etc/rspamd';
157+
$conf['rspamd']['init_script'] = 'rspamd';
158+
159+
//* ClamAV
160+
$conf['clamav']['installed'] = false; // will be detected automatically during installation
161+
$conf['clamav']['init_script'] = 'clamav-daemon';
162+
163+
//* Pureftpd
164+
$conf['pureftpd']['installed'] = false; // will be detected automatically during installation
165+
$conf['pureftpd']['config_dir'] = '/etc/pure-ftpd';
166+
$conf['pureftpd']['init_script'] = 'pure-ftpd-mysql';
167+
168+
//* MyDNS
169+
$conf['mydns']['installed'] = false; // will be detected automatically during installation
170+
$conf['mydns']['config_dir'] = '/etc';
171+
$conf['mydns']['init_script'] = 'mydns';
172+
173+
//* PowerDNS
174+
$conf['powerdns']['installed'] = false; // will be detected automatically during installation
175+
$conf['powerdns']['database'] = 'powerdns';
176+
$conf["powerdns"]["config_dir"] = '/etc/powerdns/pdns.d';
177+
$conf['powerdns']['init_script'] = 'pdns';
178+
179+
//* BIND DNS Server
180+
$conf['bind']['installed'] = false; // will be detected automatically during installation
181+
$conf['bind']['bind_user'] = 'root';
182+
$conf['bind']['bind_group'] = 'bind';
183+
$conf['bind']['bind_zonefiles_dir'] = '/etc/bind';
184+
$conf['bind']['named_conf_path'] = '/etc/bind/named.conf';
185+
$conf['bind']['named_conf_local_path'] = '/etc/bind/named.conf.local';
186+
$conf['bind']['init_script'] = 'bind9';
187+
188+
//* Jailkit
189+
$conf['jailkit']['installed'] = false; // will be detected automatically during installation
190+
$conf['jailkit']['config_dir'] = '/etc/jailkit';
191+
$conf['jailkit']['jk_init'] = 'jk_init.ini';
192+
$conf['jailkit']['jk_chrootsh'] = 'jk_chrootsh.ini';
193+
$conf['jailkit']['jailkit_chroot_app_programs'] = '/usr/bin/groups /usr/bin/id /usr/bin/dircolors /usr/bin/lesspipe /usr/bin/basename /usr/bin/dirname /usr/bin/nano /usr/bin/pico /usr/bin/mysql /usr/bin/mysqldump /usr/bin/git /usr/bin/git-receive-pack /usr/bin/git-upload-pack /usr/bin/unzip /usr/bin/zip /bin/tar /bin/rm /usr/bin/patch /etc/localtime';
194+
$conf['jailkit']['jailkit_chroot_cron_programs'] = '/usr/bin/php /usr/bin/perl /usr/share/perl /usr/share/php';
195+
196+
//* Squid
197+
$conf['squid']['installed'] = false; // will be detected automatically during installation
198+
$conf['squid']['config_dir'] = '/etc/squid';
199+
$conf['squid']['init_script'] = 'squid';
200+
201+
//* Nginx
202+
$conf['nginx']['installed'] = false; // will be detected automatically during installation
203+
$conf['nginx']['user'] = 'www-data';
204+
$conf['nginx']['group'] = 'www-data';
205+
$conf['nginx']['config_dir'] = '/etc/nginx';
206+
$conf['nginx']['vhost_conf_dir'] = '/etc/nginx/sites-available';
207+
$conf['nginx']['vhost_conf_enabled_dir'] = '/etc/nginx/sites-enabled';
208+
$conf['nginx']['init_script'] = 'nginx';
209+
$conf['nginx']['vhost_port'] = '8080';
210+
$conf['nginx']['cgi_socket'] = '/var/run/fcgiwrap.socket';
211+
$conf['nginx']['php_fpm_init_script'] = 'php8.3-fpm';
212+
$conf['nginx']['php_fpm_ini_path'] = '/etc/php/8.3/fpm/php.ini';
213+
$conf['nginx']['php_fpm_pool_dir'] = '/etc/php/8.3/fpm/pool.d';
214+
$conf['nginx']['php_fpm_start_port'] = 9010;
215+
$conf['nginx']['php_fpm_socket_dir'] = '/var/lib/php8.3-fpm';
216+
217+
//* OpenVZ
218+
$conf['openvz']['installed'] = false;
219+
220+
//*Bastille-Firwall
221+
$conf['bastille']['installed'] = false;
222+
$conf['bastille']['config_dir'] = '/etc/Bastille';
223+
224+
//* vlogger
225+
$conf['vlogger']['config_dir'] = '/etc';
226+
227+
//* cron
228+
$conf['cron']['init_script'] = 'cron';
229+
$conf['cron']['crontab_dir'] = '/etc/cron.d';
230+
$conf['cron']['wget'] = '/usr/bin/wget';
231+
232+
//* Metronome XMPP
233+
$conf['xmpp']['installed'] = false;
234+
$conf['xmpp']['init_script'] = 'metronome';
235+
236+
237+
// AppArmor
238+
$conf['apparmor']['installed'] = false;
239+
240+
?>

install/lib/install.lib.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ function get_distname() {
8585
}
8686

8787
$distname = 'Ubuntu';
88-
$distid = 'debian40';
88+
$distid = 'debian60';
8989
$distbaseid = 'debian';
9090

9191
preg_match("/.*VERSION=\"(.*)\".*/ui", $os_release, $ver);
@@ -98,6 +98,10 @@ function get_distname() {
9898
$mainver = current($mainver).'.'.next($mainver);
9999
}
100100
switch ($mainver){
101+
case "24.04":
102+
$relname = "(Noble Numbat)";
103+
$distconfid = 'ubuntu2404';
104+
break;
101105
case "22.04":
102106
$relname = "(Jammy Jellyfish)";
103107
$distconfid = 'ubuntu2204';
@@ -270,7 +274,7 @@ function get_distname() {
270274
$distname = 'Debian';
271275
$distver = 'Unknown';
272276
$distid = 'debian60';
273-
$distconfid = 'debian100';
277+
$distconfid = 'debian120';
274278
$distbaseid = 'debian';
275279
swriteln("Operating System: Debian or compatible, unknown version.\n");
276280
}

install/lib/installer_base.lib.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,11 +253,12 @@ public function check_prerequisites() {
253253
if ($conf['default_php'] != '') {
254254
if(version_compare(phpversion('tidy'), $conf['default_php'], '==')) $msg .= "Your PHP version is not the OS default. Change the PHP version back to the default version of the OS. The currently used PHP version is " . phpversion() . "The default version for your OS is PHP " . $conf['default_php'] . ".\n";
255255
}
256-
if(version_compare(phpversion(), '5.4', '<')) $msg .= "PHP Version 5.4 or newer is required. The currently used PHP version is " . phpversion() . ".\n";
256+
if(version_compare(phpversion(), '7.0', '<')) $msg .= "PHP Version 7.0 or newer is required. The currently used PHP version is " . phpversion() . ".\n";
257257
//if(version_compare(phpversion(), '8.2', '>=')) $msg .= "PHP Version 8.2+ is not supported yet. Change the PHP version back to the default version of the OS. The currently used PHP version is " . phpversion() . ".\n";
258258
if(!function_exists('curl_init')) $msg .= "PHP Curl Module is missing.\n";
259259
if(!function_exists('mysqli_connect')) $msg .= "PHP MySQLi Module is nmissing.\n";
260260
if(!function_exists('mb_detect_encoding')) $msg .= "PHP Multibyte Module (MB) is missing.\n";
261+
if(!function_exists('openssl_pkey_get_details')) $msg .= "PHP OpenSSL fiúnctions are missing.\n";
261262

262263
if($msg != '') die($msg);
263264
}
@@ -3333,7 +3334,7 @@ public function make_ispconfig_ssl_cert() {
33333334
}
33343335

33353336
// If the LE SSL certs for this hostname exists
3336-
if(!is_dir($acme_cert_dir) || !file_exists($check_acme_file) || !$issued_successfully) {
3337+
if(!is_dir($acme_cert_dir) || !file_exists($check_acme_file) || !isset($issued_successfully) || !$issued_successfully) {
33373338
if(!$issued_successfully) {
33383339
swriteln('Could not issue letsencrypt certificate, falling back to self-signed.');
33393340
} else {

install/patches/upd_0100.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?php
2+
3+
if(!defined('INSTALLER_RUN')) die('Patch update file access violation.');
4+
5+
class upd_0100 extends installer_patch_update {
6+
7+
public function onAfterSQL() {
8+
global $inst;
9+
10+
// Remove old server plugins, unless they are currently enabled
11+
if(!is_link('/usr/local/ispconfig/server/plugins-enabled/nginx_reverseproxy_plugin.inc.php'))
12+
unlink('/usr/local/ispconfig/server/plugins-available/nginx_reverseproxy_plugin.inc.php');
13+
if(!is_link('/usr/local/ispconfig/server/plugins-enabled/bind_dlz_plugin.inc.php'))
14+
unlink('/usr/local/ispconfig/server/plugins-available/bind_dlz_plugin.inc.php');
15+
}
16+
17+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
INSERT IGNORE INTO `dns_ssl_ca` (`id`, `sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `active`, `ca_name`, `ca_issue`, `ca_wildcard`, `ca_iodef`, `ca_critical`) VALUES
2+
(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'Amazon Trust Services', 'amazontrust.com', 'Y', '', 0);
3+
4+
-- 5374-mail-last-accessed-frontend
5+
ALTER TABLE `mail_user` ADD `last_access` int(11) NULL DEFAULT NULL after `disabledoveadm`;
6+
7+
ALTER TABLE `web_domain` ADD `disable_symlinknotowner` enum('n','y') NOT NULL default 'n' AFTER `last_jailkit_hash`;
8+
UPDATE `web_domain` SET `backup_format_web` = 'tar_gzip' WHERE `backup_format_web` = 'rar';
9+
UPDATE `web_domain` SET `backup_format_db` = 'zip' WHERE `backup_format_db` = 'rar';
Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
11
ALTER TABLE `server_php` ADD `php_cli_binary` varchar(255) DEFAULT NULL AFTER `php_fpm_socket_dir`;
2-
INSERT IGNORE INTO `dns_ssl_ca` (`id`, `sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `active`, `ca_name`, `ca_issue`, `ca_wildcard`, `ca_iodef`, `ca_critical`) VALUES
3-
(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'Amazon Trust Services', 'amazontrust.com', 'Y', '', 0);
4-
ALTER TABLE `web_domain` ADD `disable_symlinknotowner` enum('n','y') NOT NULL default 'n' AFTER `last_jailkit_hash`;

install/sql/ispconfig3.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1097,6 +1097,7 @@ CREATE TABLE `mail_user` (
10971097
`disablelda` enum('n','y') NOT NULL default 'n',
10981098
`disablelmtp` enum('n','y') NOT NULL default 'n',
10991099
`disabledoveadm` enum('n','y') NOT NULL default 'n',
1100+
`last_access` int(11) NULL DEFAULT NULL,
11001101
`disablequota-status` enum('n','y') NOT NULL default 'n',
11011102
`disableindexer-worker` enum('n','y') NOT NULL default 'n',
11021103
`last_quota_notification` date NULL default NULL,

install/tpl/debian_postfix.conf.master

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,9 @@ smtpd_client_restrictions = check_client_access proxy:mysql:{config_dir}/mysql-v
3333
smtpd_etrn_restrictions = permit_mynetworks, reject
3434
smtpd_data_restrictions = permit_mynetworks, reject_unauth_pipelining, reject_multi_recipient_bounce, permit
3535
smtpd_client_message_rate_limit = 100
36-
maildrop_destination_concurrency_limit = 1
37-
maildrop_destination_recipient_limit = 1
36+
# Needed for courier pop3/imap only
37+
# maildrop_destination_concurrency_limit = 1
38+
# maildrop_destination_recipient_limit = 1
3839
virtual_transport = maildrop
3940
header_checks = regexp:{config_dir}/header_checks
4041
mime_header_checks = regexp:{config_dir}/mime_header_checks

0 commit comments

Comments
 (0)