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:
parent
c73768d3ea
commit
e82489afa7
2 changed files with 16 additions and 14 deletions
|
@ -103,10 +103,7 @@ final_path=/var/www/$app
|
||||||
ynh_app_setting_set $app final_path $final_path
|
ynh_app_setting_set $app final_path $final_path
|
||||||
ynh_setup_source $final_path
|
ynh_setup_source $final_path
|
||||||
|
|
||||||
#=================================================
|
# Set files ownership during installation
|
||||||
# Files owned by root, www-data can just read
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
sudo chown $app: $final_path -R
|
sudo chown $app: $final_path -R
|
||||||
sudo chmod 755 $final_path -R
|
sudo chmod 755 $final_path -R
|
||||||
|
|
||||||
|
@ -116,12 +113,6 @@ sudo chmod 755 $final_path -R
|
||||||
|
|
||||||
ynh_nginx_config
|
ynh_nginx_config
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# NODEJS Version
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
ynh_use_nodejs
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# ADD SYSTEMD SERVICE
|
# 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 "__PORT__" "$port" "$final_path/config.js"
|
||||||
ynh_replace_string "__URL__" "$domain$path_url" "$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
|
# INSTALL MODULES FOR CRYPTPAD
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -80,10 +80,7 @@ final_path=/var/www/$app
|
||||||
ynh_app_setting_set $app final_path $final_path
|
ynh_app_setting_set $app final_path $final_path
|
||||||
ynh_setup_source $final_path
|
ynh_setup_source $final_path
|
||||||
|
|
||||||
#=================================================
|
# Set files ownership during installation
|
||||||
# Files owned by root, www-data can just read
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
sudo chown $app: $final_path -R
|
sudo chown $app: $final_path -R
|
||||||
sudo chmod 755 $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 "__URL__" "$path_url" "$final_path/config.js"
|
||||||
ynh_replace_string "__PORT__" "$port" "$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
|
# INSTALL MODULES FOR CRYPTPAD
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Reference in a new issue