diff --git a/conf/nginx.conf b/conf/nginx.conf index caea0ff..71af5c3 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -2,7 +2,7 @@ location __PATH__/ { # Path to source - alias __FINALPATH__/webroot; + alias __FINALPATH__/webroot/; if ($scheme = http) { rewrite ^ https://$server_name$request_uri? permanent; @@ -30,9 +30,9 @@ location __PATH__/ { include conf.d/yunohost_panel.conf.inc; } -location ~ __PATH__/(data|config|lib)/ { - deny all; - } +#location ~ __PATH__/(data|config|lib)/ { +# deny all; +# } location @__APP__ { rewrite ^(.*)$ __PATH__/index.php last; diff --git a/scripts/install b/scripts/install index ab3566d..04272fb 100755 --- a/scripts/install +++ b/scripts/install @@ -112,13 +112,11 @@ ynh_add_config --template="../conf/config.inc.php.dist" --destination="$final_pa # SECURE FILES AND DIRECTORIES #================================================= -#for folder in attachments cache exports files imports logs photos templates_c tempimages -#do - chown -R $app "$final_path/data" - chmod -R 775 "$final_path/data" - chown -R $app "$final_path/config" - chmod -R 775 "$final_path/config" -#done +for folder in attachments cache exports files imports logs photos templates_c tempimages +do + chown -R $app "$final_path/data/$folder" + chmod -R 775 "$final_path/data/$folder" +done #================================================= # SETUP LOGROTATE @@ -130,7 +128,7 @@ ynh_use_logrotate #================================================= # SETUP SSOWAT #================================================= -ynh_script_progression --message="Configuring SSOwat..." --weight=1 +ynh_script_progression --message="Configuring permissions..." --weight=1 # Make app public if necessary or protect it if [ $is_public -eq 1 ]