diff --git a/scripts/install b/scripts/install index db105ea..5f72bf4 100644 --- a/scripts/install +++ b/scripts/install @@ -250,6 +250,12 @@ ynh_store_file_checksum --file="$final_path/htdocs/conf/conf.php" ynh_script_progression --message="Configuring permissions..." --weight=1 # Set permissions on app files +if [ ! -f $datadir/install.lock ]; then + echo 'This is a lock file to prevent use of install pages (set with permission 440)' > "$datadir/install.lock" + chown $app:$app "$datadir/install.lock" + chmod 440 "$datadir/install.lock" +fi + chmod 750 "$final_path" chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" diff --git a/scripts/upgrade b/scripts/upgrade index cc68717..2d34b7d 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -303,6 +303,12 @@ ynh_use_logrotate --non-append ynh_script_progression --message="Configuring permissions..." --weight=1 # Set permissions on app files +if [ ! -f $datadir/install.lock ]; then + echo 'This is a lock file to prevent use of install pages (set with permission 440)' > "$datadir/install.lock" + chown $app:$app "$datadir/install.lock" + chmod 440 "$datadir/install.lock" +fi + chmod 750 "$final_path" chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path"