From 45a4450db64a63643edd37d8e3aba8d57fe6a3ad Mon Sep 17 00:00:00 2001 From: Ludovic CHEVALIER Date: Tue, 16 Apr 2013 22:55:01 +0200 Subject: [PATCH] Correcttion : Pas de - dans les nom d'utilisateurs ayant acces a mysql --- etc/nginx/site.d/lhc-stats/configure.sh | 2 +- etc/nginx/site.d/lhc-stats/site.conf | 2 +- etc/nginx/site.d/lhc-www/configure.sh | 2 +- etc/nginx/site.d/lhc-www/site.conf | 2 +- etc/php5/fpm/pool.d/{lhc-stats.conf => lhc_stats.conf} | 0 etc/php5/fpm/pool.d/{lhc-www.conf => lhc_www.conf} | 0 etc/sv/mysql/configure.sh | 1 - etc/sv/php5-fpm/configure.sh | 6 +++--- 8 files changed, 7 insertions(+), 8 deletions(-) rename etc/php5/fpm/pool.d/{lhc-stats.conf => lhc_stats.conf} (100%) rename etc/php5/fpm/pool.d/{lhc-www.conf => lhc_www.conf} (100%) diff --git a/etc/nginx/site.d/lhc-stats/configure.sh b/etc/nginx/site.d/lhc-stats/configure.sh index c1e5035..15ee1b8 100644 --- a/etc/nginx/site.d/lhc-stats/configure.sh +++ b/etc/nginx/site.d/lhc-stats/configure.sh @@ -1,2 +1,2 @@ -sudo adduser php5-lhc-stats www-"$site" +sudo adduser lhc_stats__php5 www-"$site" sudo adduser www-"$site"-tls www-"$site" diff --git a/etc/nginx/site.d/lhc-stats/site.conf b/etc/nginx/site.d/lhc-stats/site.conf index 3e22895..b52ba28 100644 --- a/etc/nginx/site.d/lhc-stats/site.conf +++ b/etc/nginx/site.d/lhc-stats/site.conf @@ -45,7 +45,7 @@ location ~ \.php$ { fastcgi_pass_header Set-Cookie; fastcgi_split_path_info ^(.+\.php)(/.+)$; - fastcgi_pass unix:/run/php5/fpm/lhc-stats; + fastcgi_pass unix:/run/php5/fpm/lhc_stats; } # vim: ft=sh diff --git a/etc/nginx/site.d/lhc-www/configure.sh b/etc/nginx/site.d/lhc-www/configure.sh index 052d4b9..b9bbd2a 100644 --- a/etc/nginx/site.d/lhc-www/configure.sh +++ b/etc/nginx/site.d/lhc-www/configure.sh @@ -1,2 +1,2 @@ -sudo adduser php5-lhc-www www-"$site" +sudo adduser lhc_www__php5 www-"$site" sudo adduser www-"$site"-tls www-"$site" diff --git a/etc/nginx/site.d/lhc-www/site.conf b/etc/nginx/site.d/lhc-www/site.conf index 158a7a8..5eabe39 100644 --- a/etc/nginx/site.d/lhc-www/site.conf +++ b/etc/nginx/site.d/lhc-www/site.conf @@ -45,7 +45,7 @@ location ~ \.php$ { fastcgi_pass_header Set-Cookie; fastcgi_split_path_info ^(.+\.php)(/.+)$; - fastcgi_pass unix:/run/php5/fpm/lhc-www; + fastcgi_pass unix:/run/php5/fpm/lhc_www; } # vim: ft=sh diff --git a/etc/php5/fpm/pool.d/lhc-stats.conf b/etc/php5/fpm/pool.d/lhc_stats.conf similarity index 100% rename from etc/php5/fpm/pool.d/lhc-stats.conf rename to etc/php5/fpm/pool.d/lhc_stats.conf diff --git a/etc/php5/fpm/pool.d/lhc-www.conf b/etc/php5/fpm/pool.d/lhc_www.conf similarity index 100% rename from etc/php5/fpm/pool.d/lhc-www.conf rename to etc/php5/fpm/pool.d/lhc_www.conf diff --git a/etc/sv/mysql/configure.sh b/etc/sv/mysql/configure.sh index c576325..2c00148 100644 --- a/etc/sv/mysql/configure.sh +++ b/etc/sv/mysql/configure.sh @@ -100,6 +100,5 @@ sudo mysql -u root --batch --verbose <<-EOF END IF; END; // - DROP PROCEDURE IF EXISTS mysql.show_user; FLUSH PRIVILEGES; EOF diff --git a/etc/sv/php5-fpm/configure.sh b/etc/sv/php5-fpm/configure.sh index d349e1f..44d5489 100644 --- a/etc/sv/php5-fpm/configure.sh +++ b/etc/sv/php5-fpm/configure.sh @@ -40,7 +40,7 @@ for pool in $(find "$tool"/etc/php5/fpm/pool.d/ \ -false ${@:+$(printf -- '-or -name %s.conf\n' "$@")} \ -printf '%f\n') do pool=${pool%\.conf} - rule adduser php5-"$pool" \ + rule adduser "$pool"__php5 \ --disabled-login \ --disabled-password \ --group \ @@ -71,7 +71,7 @@ for pool in $(find "$tool"/etc/php5/fpm/pool.d/ \ env[TEMP] = /tmp env[TMPDIR] = /tmp env[TMP] = /tmp - group = php5-$pool + group = ${pool}__php5 #listen = 127.0.0.1:9000 listen = /run/php5/fpm/$pool #listen.allowed_clients = 127.0.0.1 @@ -91,7 +91,7 @@ for pool in $(find "$tool"/etc/php5/fpm/pool.d/ \ rlimit_core = unlimited rlimit_files = 131072 slowlog = /home/www/log/php5/fpm/$pool/slow.log - user = php5-$pool + user = ${pool}__php5 $(cat "$tool"/etc/php5/fpm/pool.d/"$conf") EOF sudo install -m 664 -o php5 -g php5 \ -- 2.20.1