mirror of
https://github.com/YunoHost-Apps/phpmyadmin_ynh.git
synced 2024-09-03 19:56:46 +02:00
fix
This commit is contained in:
parent
1a911be9f8
commit
cea88cc29b
3 changed files with 14 additions and 13 deletions
|
@ -88,6 +88,10 @@ ynh_app_setting_set --app=$app --key=final_path --value=$final_path
|
|||
# Download, check integrity, uncompress and patch the source from app.src
|
||||
ynh_setup_source --dest_dir="$final_path"
|
||||
|
||||
chmod 750 "$final_path"
|
||||
chmod -R o-rwx "$final_path"
|
||||
chown -R $app:www-data "$final_path"
|
||||
|
||||
#=================================================
|
||||
# NGINX CONFIGURATION
|
||||
#=================================================
|
||||
|
@ -125,7 +129,7 @@ ynh_script_progression --message="Configuring phpMyAdmin..."
|
|||
|
||||
ynh_add_config --template="../conf/config.inc.php" --destination="$final_path/config.inc.php"
|
||||
# config.inc.php contains sensitive data, restrict its access
|
||||
chown root:$app $final_path/config.inc.php
|
||||
chown $app: $final_path/config.inc.php
|
||||
chmod 640 $final_path/config.inc.php
|
||||
|
||||
#=================================================
|
||||
|
@ -146,9 +150,6 @@ ynh_composer_exec --commands="update --no-dev"
|
|||
# SECURE FILES AND DIRECTORIES
|
||||
#=================================================
|
||||
|
||||
# Set permissions to app files
|
||||
chown -R root: $final_path
|
||||
|
||||
# Setup phpMyAdmin temporary folder
|
||||
mkdir -p $final_path/tmp
|
||||
chown $app: $final_path/tmp
|
||||
|
@ -159,7 +160,7 @@ chown $app: $final_path/tmp
|
|||
ynh_script_progression --message="Configuring permissions..." --weight=3
|
||||
|
||||
# Restrict access to admin only
|
||||
ynh_permission_update --permission="main" --remove="all_users" --add=$admin #--protected=true
|
||||
ynh_permission_update --permission="main" --remove="all_users" --add=$admin
|
||||
|
||||
#=================================================
|
||||
# RELOAD NGINX
|
||||
|
|
|
@ -62,6 +62,10 @@ ynh_script_progression --message="Restoring phpMyAdmin main directory..."
|
|||
|
||||
ynh_restore_file --origin_path="$final_path"
|
||||
|
||||
chmod 750 "$final_path"
|
||||
chmod -R o-rwx "$final_path"
|
||||
chown -R $app:www-data "$final_path"
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE MYSQL DATABASE
|
||||
#=================================================
|
||||
|
@ -86,9 +90,6 @@ fi
|
|||
# RESTORE USER RIGHTS
|
||||
#=================================================
|
||||
|
||||
# config.inc.php contains sensitive data, restrict its access
|
||||
chown root:$app $final_path/config.inc.php
|
||||
|
||||
chown $app: $final_path/tmp
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -113,6 +113,10 @@ then
|
|||
ynh_setup_source --dest_dir="$final_path" --keep="$final_path/config.inc.php"
|
||||
fi
|
||||
|
||||
chmod 750 "$final_path"
|
||||
chmod -R o-rwx "$final_path"
|
||||
chown -R $app:www-data "$final_path"
|
||||
|
||||
#=================================================
|
||||
# NGINX CONFIGURATION
|
||||
#=================================================
|
||||
|
@ -163,11 +167,6 @@ fi
|
|||
# SECURE FILES AND DIRECTORIES
|
||||
#=================================================
|
||||
|
||||
# Set permissions to app files
|
||||
chown -R root: $final_path
|
||||
# config.inc.php contains sensitive data, restrict its access
|
||||
chown root:$app $final_path/config.inc.php
|
||||
chmod 640 $final_path/config.inc.php
|
||||
# Setup phpMyAdmin temporary folder
|
||||
mkdir -p $final_path/tmp
|
||||
chown -R $app: $final_path/tmp
|
||||
|
|
Loading…
Add table
Reference in a new issue