mirror of
https://github.com/YunoHost-Apps/nextcloud_ynh.git
synced 2024-09-03 19:55:57 +02:00
Cleanup unecessary chown/chmods
This commit is contained in:
parent
06c36f91da
commit
2d510fa04d
5 changed files with 4 additions and 27 deletions
|
@ -104,6 +104,7 @@ ram.runtime = "512M"
|
|||
allow_email = true
|
||||
|
||||
[resources.install_dir]
|
||||
group = "www-data:r-x"
|
||||
|
||||
[resources.data_dir]
|
||||
subdirs = ["data"]
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue