Fix: add systemd ReadWritePaths override for PHP-FPM ProtectSystem
This commit is contained in:
1 parent
6772c05e83
commit
aba35dbe3a
2 files changed
+26
No files matched your search
+13
@@ -187,6 +187,19 @@ www-data ALL=(ALL) NOPASSWD: /usr/sbin/asterisk, /usr/sbin/nginx, /usr/bin/syste
|
||||
EOF
|
||||
chmod 0440 /etc/sudoers.d/nexus-pbx
|
||||
|
||||
# Autorisation d'écriture systemd pour PHP-FPM (Debian 12/13 ProtectSystem=full)
|
||||
for fpm_svc in /lib/systemd/system/php*-fpm.service /usr/lib/systemd/system/php*-fpm.service; do
|
||||
if [ -f "$fpm_svc" ]; then
|
||||
svc_name=$(basename "$fpm_svc")
|
||||
mkdir -p "/etc/systemd/system/${svc_name}.d"
|
||||
cat << 'EOF_OVERRIDE' > "/etc/systemd/system/${svc_name}.d/override.conf"
|
||||
[Service]
|
||||
ReadWritePaths=/etc/asterisk /etc/fail2ban /etc/nginx /var/log
|
||||
EOF_OVERRIDE
|
||||
fi
|
||||
done
|
||||
systemctl daemon-reload
|
||||
|
||||
# 5. Configuration d'Asterisk & Certificats TLS de secours
|
||||
echo -e "${C_GREEN}[4/8] Configuration du moteur Asterisk PJSIP & AMI...${C_RESET}"
|
||||
|
||||
|
||||
Reference in new issue
Block a user