diff --git a/manifest.toml b/manifest.toml index 67a9901..de5535f 100644 --- a/manifest.toml +++ b/manifest.toml @@ -16,7 +16,7 @@ admindoc = "https://cypht.org/install.html" code = "https://github.com/cypht-org/cypht" [integration] -yunohost = ">= 11.2.20" +yunohost = ">= 11.2.29" helpers_version = "2.1" architectures = "all" multi_instance = true @@ -61,6 +61,7 @@ ram.runtime = "50M" [resources.system_user] [resources.install_dir] + group = "www-data:r-x" [resources.data_dir] subdirs = ["attachments", "users", "app_data"] diff --git a/scripts/install b/scripts/install index 252c3fb..7e7e872 100755 --- a/scripts/install +++ b/scripts/install @@ -23,9 +23,8 @@ ynh_script_progression "Setting up source files..." # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir="$install_dir" -chmod -R o-rwx "$install_dir" -chown -R $app:www-data "$install_dir" - +#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod -R o-rwx "$install_dir" +#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown -R $app:www-data "$install_dir" #================================================= # SYSTEM CONFIGURATION #================================================= @@ -54,8 +53,8 @@ ynh_script_progression "Adding $app's configuration..." ynh_config_add --template=".env" --destination="$install_dir/.env" -chmod 400 "$install_dir/.env" -chown $app:$app "$install_dir/.env" +#REMOVEME? Assuming the file is setup using ynh_config_add, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod 400 "$install_dir/.env" +#REMOVEME? Assuming the file is setup using ynh_config_add, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown $app:$app "$install_dir/.env" #================================================= # ADD AN ADMIN USER diff --git a/scripts/restore b/scripts/restore index 56aefdc..b9a21e5 100755 --- a/scripts/restore +++ b/scripts/restore @@ -1,6 +1,5 @@ #!/bin/bash -# Keep this path for calling _common.sh inside the execution's context of backup and restore scripts source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers @@ -11,9 +10,6 @@ ynh_script_progression "Restoring the app main directory..." ynh_restore "$install_dir" -chmod -R o-rwx "$install_dir" -chown -R $app:www-data "$install_dir" - #================================================= # RESTORE THE DATA DIRECTORY #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 1da1b45..acf8b47 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -14,10 +14,7 @@ timezone=$(cat /etc/timezone) #================================================= ynh_script_progression "Upgrading source files..." -ynh_setup_source --dest_dir="$install_dir" #--full_replace --keep=".env" - -chmod -R o-rwx "$install_dir" -chown -R $app:www-data "$install_dir" +ynh_setup_source --dest_dir="$install_dir" #--full_replace #--keep=".env" #================================================= # REAPPLY SYSTEM CONFIGURATIONS @@ -43,9 +40,6 @@ ynh_script_progression "Adding $app's configuration..." ynh_config_add --template=".env" --destination="$install_dir/.env" -chmod 400 "$install_dir/.env" -chown $app:$app "$install_dir/.env" - #================================================= # END OF SCRIPT #=================================================