1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/snappymail_ynh.git synced 2024-09-03 20:26:29 +02:00

Fix files permissions

This commit is contained in:
Salamandar 2024-08-09 16:13:31 +02:00
parent 78ad3a1baf
commit c5093281b7
3 changed files with 13 additions and 10 deletions

View file

@ -10,7 +10,7 @@ ynh_script_progression "Setting up source files..."
ynh_setup_source --dest_dir="$install_dir/app"
chmod -R 750 "$install_dir"
chmod -R "u=rX,g=rX,o=" "$install_dir"
chown -R "$app:www-data" "$install_dir"
#=================================================
@ -21,8 +21,8 @@ ynh_script_progression "Adding $app's configuration..."
mkdir -p "$install_dir/app/data/_data_/_default_/configs"
ynh_config_add --template="application.ini" --destination="$install_dir/app/data/_data_/_default_/configs/application.ini"
chown -R $app:$app "$install_dir/app/data"
chmod -R 600 "$install_dir/app/data"
chmod -R "u=rwX,g=,o=" "$install_dir/app/data"
chown -R "$app:$app" "$install_dir/app/data"
#=================================================
# SETUP SSO
@ -30,8 +30,8 @@ chmod -R 600 "$install_dir/app/data"
ynh_script_progression "Applying SSO patch..."
ynh_config_add --template="sso.php" --destination="$install_dir/index.php"
chmod "u=rX,g=,o=" "$install_dir/index.php"
chown "$app:www-data" "$install_dir/index.php"
chmod 750 "$install_dir/index.php"
#=================================================
# SYSTEM CONFIGURATION

View file

@ -11,10 +11,13 @@ ynh_script_progression "Restoring the app main directory..."
ynh_restore "$install_dir"
chmod -R 750 "$install_dir"
chmod -R "u=rX,g=rX,o=" "$install_dir"
chown -R "$app:www-data" "$install_dir"
chmod 600 "$install_dir/app/data/_data_/_default_/configs/application.ini"
chown -R "$app:$app" "$install_dir/app/data/_data_"
chmod -R "u=rwX,g=,o=" "$install_dir/app/data"
chown -R "$app:$app" "$install_dir/app/data"
chmod "u=rX,g=,o=" "$install_dir/index.php"
#=================================================
# RESTORE SYSTEM CONFIGURATIONS

View file

@ -24,7 +24,7 @@ ynh_script_progression "Upgrading source files..."
ynh_setup_source --dest_dir="$install_dir/app" --full_replace=1 --keep="data/_data_/_default_/configs/application.ini"
chmod -R 750 "$install_dir"
chmod -R "u=rX,g=rX,o=" "$install_dir"
chown -R "$app:www-data" "$install_dir"
#=================================================
@ -34,7 +34,7 @@ chown -R "$app:www-data" "$install_dir"
#ynh_config_add --template="application.ini" --destination="$install_dir/app/data/_data_/_default_/configs/application.ini"
chmod -R 600 "$install_dir/app/data"
chmod -R "u=rwX,g=,o=" "$install_dir/app/data"
chown -R "$app:$app" "$install_dir/app/data"
#=================================================
@ -43,8 +43,8 @@ chown -R "$app:$app" "$install_dir/app/data"
ynh_script_progression "Applying SSO patch..."
ynh_config_add --template="sso.php" --destination="$install_dir/index.php"
chmod "u=rX,g=,o=" "$install_dir/index.php"
chown "$app:www-data" "$install_dir/index.php"
chmod 750 "$install_dir/index.php"
#=================================================
# REAPPLY SYSTEM CONFIGURATIONS