diff --git a/scripts/install b/scripts/install index 59a181e..faa2eeb 100644 --- a/scripts/install +++ b/scripts/install @@ -84,6 +84,10 @@ ynh_replace_string --match_string="__AUTHOR__" --replace_string="$author" --targ ynh_replace_string --match_string="__DATE__" --replace_string="$date" --target_file="../sources/content/first-article.md" cp -a ../sources/. $final_path +chmod 750 "$final_path" +chmod -R o-rwx "$final_path" +chown -R $app:www-data "$final_path" + #================================================= # NGINX CONFIGURATION #================================================= @@ -107,10 +111,12 @@ pushd $final_path pelican -s pelicanconf.py -D popd -# Set permissions -chmod 775 -R $final_path -chown -hR www-data:www-data $final_path +chmod 750 "$final_path" +chmod -R o-rwx "$final_path" +chown -R $app:www-data "$final_path" +#================================================= +# GENERIC FINALIZATION #================================================= # SETUP SSOWAT #================================================= diff --git a/scripts/restore b/scripts/restore index f72d3aa..8218c2d 100644 --- a/scripts/restore +++ b/scripts/restore @@ -52,8 +52,10 @@ ynh_script_progression --message="Restoring the app main directory..." ynh_restore_file --origin_path="$final_path" -chmod 775 -R $final_path -chown -hR www-data:www-data $final_path +chmod 750 "$final_path" +chmod -R o-rwx "$final_path" +chown -R $app:www-data "$final_path" + #================================================= # SPECIFIC RESTORATION #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 4eee137..34a3a98 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -76,6 +76,8 @@ then # Download, check integrity, uncompress and patch the source from app.src date=`date +%Y-%m-%d` mkdir -p $final_path + ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="../sources/publishconf.py" + ynh_replace_string --match_string="__PATH__" --replace_string="$path_url" --target_file="../sources/publishconf.py" ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="../sources/pelicanconf.py" ynh_replace_string --match_string="__PATH__" --replace_string="$path_url" --target_file="../sources/pelicanconf.py" ynh_replace_string --match_string="__AUTHOR__" --replace_string="$author" --target_file="../sources/pelicanconf.py" @@ -120,9 +122,9 @@ pushd $final_path pelican -s pelicanconf.py -D popd -# Set permissions -chmod 775 -R $final_path -chown -hR www-data:www-data $final_path +chmod 750 "$final_path" +chmod -R o-rwx "$final_path" +chown -R $app:www-data "$final_path" #================================================= # GENERIC FINALIZATION