mirror of
https://github.com/YunoHost-Apps/snserver_ynh.git
synced 2024-09-03 20:26:22 +02:00
Set permissions
This commit is contained in:
parent
efd5e7e662
commit
d6093af701
3 changed files with 16 additions and 6 deletions
|
@ -225,8 +225,11 @@ ynh_store_file_checksum --file="/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||||
ynh_script_progression --message="Securing files and directories..." --weight=1
|
ynh_script_progression --message="Securing files and directories..." --weight=1
|
||||||
|
|
||||||
# Set permissions to app files
|
# Set permissions to app files
|
||||||
chown -R root: $final_path
|
chmod 750 "$final_path"
|
||||||
chown $app: $final_path
|
chmod -R o-rwx "$final_path"
|
||||||
|
chown -R root: "$final_path"
|
||||||
|
chown $app: "$final_path"
|
||||||
|
|
||||||
mkdir -p "$final_path/live/log"
|
mkdir -p "$final_path/live/log"
|
||||||
chown -R $app: "$final_path/live/log/"
|
chown -R $app: "$final_path/live/log/"
|
||||||
mkdir -p "$final_path/live/tmp"
|
mkdir -p "$final_path/live/tmp"
|
||||||
|
|
|
@ -80,12 +80,16 @@ ynh_system_user_create --username=$app --home_dir=$final_path
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# Restore permissions on app files
|
# Restore permissions on app files
|
||||||
chown -R root: $final_path
|
chmod 750 "$final_path"
|
||||||
chown $app: $final_path
|
chmod -R o-rwx "$final_path"
|
||||||
|
chown -R root: "$final_path"
|
||||||
|
chown $app: "$final_path"
|
||||||
|
|
||||||
mkdir -p "$final_path/live/log"
|
mkdir -p "$final_path/live/log"
|
||||||
chown -R $app: "$final_path/live/log/"
|
chown -R $app: "$final_path/live/log/"
|
||||||
mkdir -p "$final_path/live/tmp"
|
mkdir -p "$final_path/live/tmp"
|
||||||
chown -R $app: "$final_path/live/tmp/"
|
chown -R $app: "$final_path/live/tmp/"
|
||||||
|
|
||||||
mkdir -p "/var/log/$app"
|
mkdir -p "/var/log/$app"
|
||||||
chown -R $app: "/var/log/$app"
|
chown -R $app: "/var/log/$app"
|
||||||
|
|
||||||
|
|
|
@ -323,8 +323,11 @@ ynh_store_file_checksum --file="/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# Set permissions to app files
|
# Set permissions to app files
|
||||||
chown -R root: $final_path
|
chmod 750 "$final_path"
|
||||||
chown $app: $final_path
|
chmod -R o-rwx "$final_path"
|
||||||
|
chown -R root: "$final_path"
|
||||||
|
chown $app: "$final_path"
|
||||||
|
|
||||||
mkdir -p "$final_path/live/log"
|
mkdir -p "$final_path/live/log"
|
||||||
chown -R $app: "$final_path/live/log/"
|
chown -R $app: "$final_path/live/log/"
|
||||||
mkdir -p "$final_path/live/tmp"
|
mkdir -p "$final_path/live/tmp"
|
||||||
|
|
Loading…
Reference in a new issue