Fixed permission issue

This commit is contained in:
anmol26s 2018-05-08 04:50:41 +05:30
parent 54efc0fd80
commit a84c733f89
3 changed files with 12 additions and 9 deletions

View file

@ -142,12 +142,9 @@ touch "$final_path/config/local-production.json"
mkdir -p "/etc/nginx/conf.d/${domain}.d"
ynh_add_nginx_config
#=================================================
# SETUP APPLICATION WITH CURL
#=================================================
# Set right permissions for curl install
chown -R "$app" "$datadir"
chown -R "$app":"app" "$datadir"
# Reload Nginx
systemctl reload nginx
@ -179,7 +176,7 @@ ynh_store_file_checksum "$final_path/config/production.yaml"
#=================================================
# Use logrotate to manage application logfile(s)
ynh_use_logrotate
ynh_use_logrotate "/home/yunohost.app/${app}/storage/logs/peertube.log"
#=================================================
# SETUP SSOWAT
@ -211,6 +208,9 @@ systemctl start "$app"
# we need to wait for the service to init peertube's database
(cd "/var/www/$app" && sleep 15 && exec /bin/sh -c "echo $admin_pass | NODE_CONFIG_DIR=/var/www/$app/config NODE_ENV=production PATH=/opt/node_n/bin:$PATH npm run reset-password -- -u root")
# Give permisiion to the final_path
chown -R "$app":"$app" "$final_path" "$datadir"
#=================================================
# RELOAD NGINX
#=================================================

View file

@ -79,9 +79,9 @@ ynh_system_user_create "$app"
# RESTORE USER RIGHTS
#=================================================
# Set right permissions for curl install
# Set right permissions
datadir="/home/yunohost.app/${app}/storage"
chown -R "$app" "$datadir"
chown -R "$app":"app" "$datadir"
#=================================================
# SPECIFIC RESTORATION
@ -132,6 +132,9 @@ ynh_restore_file "/etc/logrotate.d/$app"
(cd "$final_path" && yarn install --production --pure-lockfile)
# Set right permissions for curl install
chown -R "$app":"app" "$datadir"
#=================================================
# GENERIC FINALIZATION
#=================================================

View file

@ -159,8 +159,8 @@ ynh_use_logrotate --non-append
ynh_add_systemd_config
# Set right permissions for curl installation
chown -R "$app":$app "$final_path" "$datadir"
# Set right permissions
chown -R "$app":"$app" "$final_path" "$datadir"
#=================================================