mirror of
https://github.com/YunoHost-Apps/snappymail_ynh.git
synced 2024-09-03 20:26:29 +02:00
Fix file permissions.
This commit is contained in:
parent
1cc6608cc2
commit
6d0d069b2b
3 changed files with 15 additions and 7 deletions
|
@ -10,7 +10,7 @@ ynh_script_progression "Setting up source files..."
|
|||
|
||||
ynh_setup_source --dest_dir="$install_dir/app"
|
||||
|
||||
chmod -R o-rwx "$install_dir"
|
||||
chmod -R 755 "$install_dir"
|
||||
chown -R $app:www-data "$install_dir"
|
||||
|
||||
#=================================================
|
||||
|
@ -45,6 +45,8 @@ chown $app:$app "$install_dir/app/data/_data_/_default_/configs/application.ini"
|
|||
ynh_script_progression "Applying SSO patch..."
|
||||
|
||||
ynh_config_add --template="sso.php" --destination="$install_dir/index.php"
|
||||
chown $app:www-data "$install_dir/index.php"
|
||||
chmod 750 "$install_dir/index.php"
|
||||
|
||||
#=================================================
|
||||
# END OF SCRIPT
|
||||
|
|
|
@ -11,8 +11,10 @@ ynh_script_progression "Restoring the app main directory..."
|
|||
|
||||
ynh_restore "$install_dir"
|
||||
|
||||
chmod -R o-rwx "$install_dir"
|
||||
chmod -R 750 "$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_"
|
||||
|
||||
#=================================================
|
||||
# RESTORE SYSTEM CONFIGURATIONS
|
||||
|
|
|
@ -16,7 +16,9 @@ then
|
|||
mkdir -p $install_dir/app
|
||||
# Ugly way to not return an error when moving everything to a subfolter of the same folder https://stackoverflow.com/a/43262922
|
||||
find $install_dir -maxdepth 1 -mindepth 1 -not -name app -exec mv -t $install_dir/app {} +
|
||||
chown $app:root $install_dir/app/
|
||||
chown $app:www-data $install_dir/app/
|
||||
chown $app:$app -R "$install_dir/app/data/_data_"
|
||||
chmod 600 "$install_dir/app/data/_data_/_default_/configs/application.ini"
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
|
@ -24,9 +26,9 @@ fi
|
|||
#=================================================
|
||||
ynh_script_progression "Upgrading source files..."
|
||||
|
||||
ynh_setup_source --dest_dir="$install_dir/app" --keep="data/_data_/_default_/configs/application.ini"
|
||||
ynh_setup_source --dest_dir="$install_dir/app" --full_replace=1 --keep="data/_data_/_default_/configs/application.ini"
|
||||
|
||||
chmod -R o-rwx "$install_dir"
|
||||
chmod -R 750 "$install_dir"
|
||||
chown -R $app:www-data "$install_dir"
|
||||
|
||||
#=================================================
|
||||
|
@ -49,8 +51,8 @@ ynh_config_add_logrotate
|
|||
|
||||
#ynh_config_add --template="application.ini" --destination="$install_dir/app/data/_data_/_default_/configs/application.ini"
|
||||
|
||||
#chmod 600 "$install_dir/app/data/_data_/_default_/configs/application.ini"
|
||||
#chown $app:$app "$install_dir/app/data/_data_/_default_/configs/application.ini"
|
||||
chmod 600 "$install_dir/app/data/_data_/_default_/configs/application.ini"
|
||||
chown -R $app:$app "$install_dir/app/data/_data_"
|
||||
|
||||
#=================================================
|
||||
# SETUP SSO
|
||||
|
@ -58,6 +60,8 @@ ynh_config_add_logrotate
|
|||
ynh_script_progression "Applying SSO patch..."
|
||||
|
||||
ynh_config_add --template="sso.php" --destination="$install_dir/index.php"
|
||||
chown $app:www-data "$install_dir/index.php"
|
||||
chmod 750 "$install_dir/index.php"
|
||||
|
||||
#=================================================
|
||||
# END OF SCRIPT
|
||||
|
|
Loading…
Add table
Reference in a new issue