1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/cryptpad_ynh.git synced 2024-09-03 18:26:14 +02:00

Restrict files ownership

This commit is contained in:
Jimmy Monin 2017-07-25 08:25:22 +02:00
parent c73768d3ea
commit e82489afa7
2 changed files with 16 additions and 14 deletions

View file

@ -103,10 +103,7 @@ final_path=/var/www/$app
ynh_app_setting_set $app final_path $final_path
ynh_setup_source $final_path
#=================================================
# Files owned by root, www-data can just read
#=================================================
# Set files ownership during installation
sudo chown $app: $final_path -R
sudo chmod 755 $final_path -R
@ -116,12 +113,6 @@ sudo chmod 755 $final_path -R
ynh_nginx_config
#=================================================
# NODEJS Version
#=================================================
ynh_use_nodejs
#=================================================
# ADD SYSTEMD SERVICE
#=================================================
@ -152,6 +143,13 @@ sudo mv ../conf/config.js $final_path/config.js
ynh_replace_string "__PORT__" "$port" "$final_path/config.js"
ynh_replace_string "__URL__" "$domain$path_url" "$final_path/config.js"
#=================================================
# SET FILES OWNERSHIP
#=================================================
chown -R root: $final_path
chown -R $app: $final_path/datastore
#=================================================
# INSTALL MODULES FOR CRYPTPAD
#=================================================

View file

@ -80,10 +80,7 @@ final_path=/var/www/$app
ynh_app_setting_set $app final_path $final_path
ynh_setup_source $final_path
#=================================================
# Files owned by root, www-data can just read
#=================================================
# Set files ownership during installation
sudo chown $app: $final_path -R
sudo chmod 755 $final_path -R
@ -123,6 +120,13 @@ sudo mv ../conf/config.js $final_path/config.js
ynh_replace_string "__URL__" "$path_url" "$final_path/config.js"
ynh_replace_string "__PORT__" "$port" "$final_path/config.js"
#=================================================
# SET FILES OWNERSHIP
#=================================================
chown -R root: $final_path
chown -R $app: $final_path/datastore
#=================================================
# INSTALL MODULES FOR CRYPTPAD
#=================================================