diff --git a/scripts/install b/scripts/install index 9691746..1f8f866 100644 --- a/scripts/install +++ b/scripts/install @@ -82,16 +82,8 @@ ynh_replace_string --match_string="\$default_timezone = 'Etc/UTC'; // UTC" --rep ynh_replace_string --match_string="\$root_path = \$_SERVER\['DOCUMENT_ROOT'\];" --replace_string="\$root_path = '/var/www';" --target_file=$final_path/config.php ynh_replace_string --match_string="\$max_upload_size_bytes = 5000;" --replace_string="\$max_upload_size_bytes = 5000000;" --target_file=$final_path/config.php -# Allow app to browse content of /var/www -setfacl -m g:$app:rx /var/www - chown -R $app: "$final_path" -if ! ynh_system_group_exists "web" # Check if the group exists on the system -then # If the user doesn't exist - yunohost user group create web -fi - ynh_package_install proftpd-mod-ldap echo " @@ -117,9 +109,12 @@ systemctl restart proftpd yunohost firewall allow TCP 21 yunohost firewall allow TCP 50000:50100 -# Allow web group to browse content of /var/www -setfacl -m g:tiny_file_manager:rx /var/www -setfacl -m g:tiny_file_manager.main:rx /var/www +# Allow app to browse content of /var/www +setfacl -m g:$app:rx /var/www +setfacl -m g:$app.main:rx /var/www + +# Automatically add link to www folder to new users +ln -s /var/www /etc/skel/www #================================================= # PHP-FPM CONFIGURATION