Browse Source
Merge pull request #123 from lolusab/testing
remove permissions for other on wp-config file
pull/126/head
Kayou
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with
11 additions and
5 deletions
-
scripts/actions/reset_default_app
-
scripts/install
-
scripts/restore
-
scripts/upgrade
|
|
@ -78,12 +78,15 @@ echo "# Reach everyday wp-cron.php to trig the internal WordPress cron. |
|
|
# Files have to be own by the user of wordpress. To allow upgrade from the app. |
|
|
# Files have to be own by the user of wordpress. To allow upgrade from the app. |
|
|
chown -R $app: $final_path |
|
|
chown -R $app: $final_path |
|
|
# Except the file config wp-config.php |
|
|
# Except the file config wp-config.php |
|
|
chown root: $final_path/wp-config.php |
|
|
|
|
|
|
|
|
chown root:$app $final_path/wp-config.php |
|
|
|
|
|
|
|
|
# Reset permissions |
|
|
# Reset permissions |
|
|
find $final_path/ -type f -print0 | xargs -0 chmod 0644 |
|
|
find $final_path/ -type f -print0 | xargs -0 chmod 0644 |
|
|
find $final_path/ -type d -print0 | xargs -0 chmod 0755 |
|
|
find $final_path/ -type d -print0 | xargs -0 chmod 0755 |
|
|
|
|
|
|
|
|
|
|
|
# Remove permissions for others |
|
|
|
|
|
chmod 640 $final_path/wp-config.php |
|
|
|
|
|
|
|
|
#================================================= |
|
|
#================================================= |
|
|
# UPGRADE FAIL2BAN |
|
|
# UPGRADE FAIL2BAN |
|
|
#================================================= |
|
|
#================================================= |
|
|
|
|
|
@ -241,7 +241,8 @@ echo "# Reach everyday wp-cron.php to trig the internal WordPress cron. |
|
|
# Files have to be own by the user of wordpress. To allow upgrade from the app. |
|
|
# Files have to be own by the user of wordpress. To allow upgrade from the app. |
|
|
chown -R $app: $final_path |
|
|
chown -R $app: $final_path |
|
|
# Except the file config wp-config.php |
|
|
# Except the file config wp-config.php |
|
|
chown root: $final_path/wp-config.php |
|
|
|
|
|
|
|
|
chown root:$app $final_path/wp-config.php |
|
|
|
|
|
chmod 640 $final_path/wp-config.php |
|
|
|
|
|
|
|
|
#================================================= |
|
|
#================================================= |
|
|
# SETUP FAIL2BAN |
|
|
# SETUP FAIL2BAN |
|
|
|
|
|
@ -91,7 +91,8 @@ ynh_system_user_create --username=$app |
|
|
# Files have to be own by the user of wordpress. To allow upgrade from the app. |
|
|
# Files have to be own by the user of wordpress. To allow upgrade from the app. |
|
|
chown -R $app: $final_path |
|
|
chown -R $app: $final_path |
|
|
# Except the file config wp-config.php |
|
|
# Except the file config wp-config.php |
|
|
chown root: $final_path/wp-config.php |
|
|
|
|
|
|
|
|
chown root:$app $final_path/wp-config.php |
|
|
|
|
|
chmod 640 $final_path/wp-config.php |
|
|
|
|
|
|
|
|
#================================================= |
|
|
#================================================= |
|
|
# RESTORE THE PHP-FPM CONFIGURATION |
|
|
# RESTORE THE PHP-FPM CONFIGURATION |
|
|
|
|
|
@ -220,7 +220,7 @@ then |
|
|
ynh_store_file_checksum --file="/etc/nginx/conf.d/$domain.d/$app.conf" |
|
|
ynh_store_file_checksum --file="/etc/nginx/conf.d/$domain.d/$app.conf" |
|
|
|
|
|
|
|
|
ynh_systemd_action --service_name=nginx --action=reload |
|
|
ynh_systemd_action --service_name=nginx --action=reload |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
plugin_network="--network" |
|
|
plugin_network="--network" |
|
|
else |
|
|
else |
|
|
multisite=0 |
|
|
multisite=0 |
|
|
@ -276,7 +276,8 @@ echo "# Reach everyday wp-cron.php to trig the internal WordPress cron. |
|
|
# Files have to be own by the user of wordpress. To allow upgrade from the app. |
|
|
# Files have to be own by the user of wordpress. To allow upgrade from the app. |
|
|
chown -R $app: $final_path |
|
|
chown -R $app: $final_path |
|
|
# Except the file config wp-config.php |
|
|
# Except the file config wp-config.php |
|
|
chown root: $final_path/wp-config.php |
|
|
|
|
|
|
|
|
chown root:$app $final_path/wp-config.php |
|
|
|
|
|
chmod 640 $final_path/wp-config.php |
|
|
|
|
|
|
|
|
#================================================= |
|
|
#================================================= |
|
|
# UPGRADE FAIL2BAN |
|
|
# UPGRADE FAIL2BAN |
|
|
|