diff --git a/manifest.toml b/manifest.toml index 18e7670..55d5237 100644 --- a/manifest.toml +++ b/manifest.toml @@ -104,6 +104,7 @@ ram.runtime = "512M" allow_email = true [resources.install_dir] + group = "www-data:r-x" [resources.data_dir] subdirs = ["data"] diff --git a/scripts/config b/scripts/config index 134df7b..11f0b9e 100644 --- a/scripts/config +++ b/scripts/config @@ -3,8 +3,6 @@ source _common.sh source /usr/share/yunohost/helpers -ynh_abort_if_errors - #================================================= # RETRIEVE ARGUMENTS #================================================= @@ -61,6 +59,4 @@ set__system_addressbook_exposed() { ynh_print_info "System addressbook is exposed: $system_addressbook_exposed" } -#================================================= - ynh_app_config_run $1 diff --git a/scripts/install b/scripts/install index 2d5d15e..ca027bd 100755 --- a/scripts/install +++ b/scripts/install @@ -200,8 +200,6 @@ ynh_store_file_checksum "$install_dir/config/config.php" cron_path="/etc/cron.d/$app" ynh_config_add --template="nextcloud.cron" --destination="$cron_path" -chown root: "$cron_path" -chmod 644 "$cron_path" exec_occ background:cron @@ -232,15 +230,10 @@ ynh_multimedia_addaccess $app #================================================= # Fix app ownerships & permissions -chown -R $app:www-data "$install_dir" +# FIXME: is this really needed x_x chown -R $app: "$data_dir" -find $install_dir/ -type f -print0 | xargs -r0 chmod 0644 -find $install_dir/ -type d -print0 | xargs -r0 chmod 0755 find $data_dir/data/ -type f -print0 | xargs -r0 chmod 0640 find $data_dir/data/ -type d -print0 | xargs -r0 chmod 0750 -chmod 640 "$install_dir/config/config.php" -chmod 755 /home/yunohost.app -chmod 750 $install_dir #================================================= # SETUP LOGROTATE diff --git a/scripts/restore b/scripts/restore index 9520138..c00bd42 100755 --- a/scripts/restore +++ b/scripts/restore @@ -79,16 +79,9 @@ ynh_restore "$data_dir" #================================================= # Fix app ownerships & permissions -chown -R $app:www-data "$install_dir" chown -R $app: "$data_dir" -find $install_dir/ -type f -print0 | xargs -r0 chmod 0644 -find $install_dir/ -type d -print0 | xargs -r0 chmod 0755 find $data_dir/data/ -type f -print0 | xargs -r0 chmod 0640 find $data_dir/data/ -type d -print0 | xargs -r0 chmod 0750 -chmod 640 "$install_dir/config/config.php" -chmod 755 /home/yunohost.app -chmod 750 $install_dir - # Iterate over users to extend their home folder permissions - for the external # storage plugin usage - and create relevant Nextcloud directories for u in $(ynh_user_list); do diff --git a/scripts/upgrade b/scripts/upgrade index 27c6f59..04bf80e 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -118,6 +118,7 @@ then fi fi +# FIXME: this is still supported but the recommendation is now to *always* re-setup the app sources wether or not the upstream sources changed if ynh_app_upstream_version_changed then ynh_script_progression "Upgrading $app..." @@ -308,16 +309,11 @@ fi ynh_script_progression "Reapplying file permissions..." # Fix app ownerships & permissions -chown -R $app:www-data "$install_dir" chown -R $app: "$data_dir" -find $install_dir/ -type f -print0 | xargs -r0 chmod 0644 -find $install_dir/ -type d -print0 | xargs -r0 chmod 0755 find $data_dir/data/ -type f -print0 | xargs -r0 chmod 0640 find $data_dir/data/ -type d -print0 | xargs -r0 chmod 0750 chmod 640 "$install_dir/config/config.php" -chmod 755 /home/yunohost.app -chmod 750 $install_dir - +# #================================================= # REGEN SYSTEM CONFIGURATIONS #================================================= @@ -359,8 +355,6 @@ ynh_config_add_nginx cron_path="/etc/cron.d/$app" ynh_config_add --template="nextcloud.cron" --destination="$cron_path" -chown root: "$cron_path" -chmod 644 "$cron_path" exec_occ background:cron