Switch gnupg1 to gnupg2 and set env[HOME] for php correctly

This commit is contained in:
Daniel Winzen
2020-01-05 15:03:20 +01:00
parent 6d92ea99e0
commit f573f79f6c
6 changed files with 11 additions and 5 deletions

View File

@ -613,6 +613,7 @@ php_admin_value[disable_functions] = pcntl_alarm,pcntl_async_signals,pcntl_exec,
php_admin_value[upload_tmp_dir] = /tmp
php_admin_value[soap.wsdl_cache_dir] = /tmp
php_admin_value[session.save_path] = /tmp
env[HOME]=/
";
}
file_put_contents("/etc/php/$version/fpm/pool.d/$key/www.conf", $php);

View File

@ -24,7 +24,7 @@ while($id=$stmt->fetch(PDO::FETCH_NUM)){
exec('useradd -l -p ' . escapeshellarg($id[2]) . ' -g www-data -k /var/www/skel -m -s ' . escapeshellarg($shell) . ' ' . escapeshellarg($system_account));
exec('/var/www/setup_chroot.sh ' . escapeshellarg("/home/$system_account"));
exec('grep ' . escapeshellarg($system_account) . ' /etc/passwd >> ' . escapeshellarg("/home/$system_account/etc/passwd"));
foreach(['.cache', '.composer', '.config', '.local', '.ssh', 'data', 'Maildir'] as $dir){
foreach(['.cache', '.composer', '.config', '.gnupg', '.local', '.ssh', 'data', 'Maildir'] as $dir){
mkdir("/home/$system_account/$dir", 0700);
chown("/home/$system_account/$dir", $system_account);
chgrp("/home/$system_account/$dir", 'www-data');

View File

@ -211,6 +211,7 @@ php_admin_value[mysqli.allow_persistent] = On
php_admin_value[upload_tmp_dir] = /tmp
php_admin_value[soap.wsdl_cache_dir] = /tmp
php_admin_value[session.save_path] = /tmp
env[HOME]=/
[phpmyadmin]
user = www-data
group = www-data
@ -228,6 +229,7 @@ php_admin_value[upload_tmp_dir] = /tmp
php_admin_value[soap.wsdl_cache_dir] = /tmp
php_admin_value[session.save_path] = /tmp
php_admin_value[open_basedir] = /html/phpmyadmin:/tmp
env[HOME]=/
[squirrelmail]
user = www-data
group = www-data
@ -258,6 +260,7 @@ php_admin_value[upload_tmp_dir] = /tmp
php_admin_value[soap.wsdl_cache_dir] = /tmp
php_admin_value[session.save_path] = /tmp
php_admin_value[open_basedir] = /html/adminer:/tmp
env[HOME]=/
";
if(!file_exists("/etc/php/$version/fpm/pool.d/")){
mkdir("/etc/php/$version/fpm/pool.d/", 0755, true);

View File

@ -126,6 +126,7 @@ BINARIES_GENERAL=(
'/usr/bin/vi'
'/usr/bin/awk'
'/usr/bin/composer'
'/usr/bin/gpg'
)
FILES_GENERAL=(
'/etc/hosts'