1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/backdrop_ynh.git synced 2024-09-03 20:36:14 +02:00

protect final_path

This commit is contained in:
ericgaspar 2021-03-25 08:30:03 +01:00
parent ef747db34b
commit 162050e133
No known key found for this signature in database
GPG key ID: 574F281483054D44
3 changed files with 6 additions and 3 deletions

View file

@ -61,7 +61,7 @@ ynh_mysql_setup_db --db_user=$db_name --db_name=$db_name
ynh_script_progression --message="Configuring system user..." --weight=2 ynh_script_progression --message="Configuring system user..." --weight=2
# Create a system user # Create a system user
ynh_system_user_create --username=$app ynh_system_user_create --username=$app --home_dir="$final_path"
#================================================= #=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE # DOWNLOAD, CHECK AND UNPACK SOURCE
@ -112,6 +112,7 @@ ynh_store_file_checksum --file="$final_path/settings.php"
# Set permissions to app files # Set permissions to app files
chown -R root: $final_path chown -R root: $final_path
chmod o-rwx $final_path
chown -R $app:www-data $final_path/files chown -R $app:www-data $final_path/files
chmod -R 770 $final_path/files chmod -R 770 $final_path/files

View file

@ -52,7 +52,7 @@ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
ynh_script_progression --message="Recreating the dedicated system user..." --weight=3 ynh_script_progression --message="Recreating the dedicated system user..." --weight=3
# Create the dedicated user (if not existing) # Create the dedicated user (if not existing)
ynh_system_user_create --username=$app ynh_system_user_create --username=$app --home_dir="$final_path"
#================================================= #=================================================
# RESTORE THE APP MAIN DIR # RESTORE THE APP MAIN DIR
@ -67,6 +67,7 @@ ynh_restore_file --origin_path="$final_path"
# Set permissions to app files # Set permissions to app files
chown -R root: $final_path chown -R root: $final_path
chmod o-rwx $final_path
chown -R $app:www-data $final_path/files chown -R $app:www-data $final_path/files
chmod -R 770 $final_path/files chmod -R 770 $final_path/files

View file

@ -73,7 +73,7 @@ ynh_abort_if_errors
ynh_script_progression --message="Making sure dedicated system user exists..." --weight=1 ynh_script_progression --message="Making sure dedicated system user exists..." --weight=1
# Create a dedicated user (if not existing) # Create a dedicated user (if not existing)
ynh_system_user_create --username=$app ynh_system_user_create --username=$app --home_dir="$final_path"
#================================================= #=================================================
# STANDARD UPGRADE STEPS # STANDARD UPGRADE STEPS
@ -141,6 +141,7 @@ fi
# Set permissions to app files # Set permissions to app files
chown -R root: $final_path chown -R root: $final_path
chmod o-rwx $final_path
chown -R $app:www-data $final_path/files chown -R $app:www-data $final_path/files
chmod -R 770 $final_path/files chmod -R 770 $final_path/files