mirror of
https://github.com/YunoHost-Apps/snweb_ynh.git
synced 2024-09-03 20:26:22 +02:00
Fix permissions
This commit is contained in:
parent
775321f881
commit
a03255b0ba
3 changed files with 12 additions and 22 deletions
|
@ -181,19 +181,16 @@ ynh_store_file_checksum --file="/etc/nginx/conf.d/$domain.d/$app.conf"
|
|||
ynh_script_progression --message="Securing files and directories..." --weight=1
|
||||
|
||||
# Set permissions to app files
|
||||
chown -R root:root "$final_path"
|
||||
chown $app: "$final_path"
|
||||
mkdir -p $app: "$final_path/.config"
|
||||
chown $app: "$final_path/.config"
|
||||
mkdir -p $app: "$final_path/.cache"
|
||||
chown $app: "$final_path/.cache"
|
||||
chmod 750 "$final_path"
|
||||
chmod -R o-rwx "$final_path"
|
||||
chown -R $app: "$final_path"
|
||||
|
||||
mkdir -p "$final_path/live/log"
|
||||
chown -R $app: "$final_path/live/log"
|
||||
mkdir -p "$final_path/live/public"
|
||||
chown -R $app: "$final_path/live/public"
|
||||
mkdir -p "$final_path/live/tmp"
|
||||
chown -R $app: "$final_path/live/tmp"
|
||||
chown $app: "$final_path/live/Gemfile.lock"
|
||||
|
||||
mkdir -p "/var/log/$app"
|
||||
chown -R $app: "/var/log/$app"
|
||||
|
|
|
@ -99,20 +99,16 @@ popd
|
|||
#=================================================
|
||||
|
||||
# Restore permissions on app files
|
||||
chown -R root:root "$final_path"
|
||||
chown $app: "$final_path"
|
||||
chown $app: "$final_path/live"
|
||||
mkdir -p $app: "$final_path/.config"
|
||||
chown $app: "$final_path/.config"
|
||||
mkdir -p $app: "$final_path/.cache"
|
||||
chown $app: "$final_path/.cache"
|
||||
chmod 750 "$final_path"
|
||||
chmod -R o-rwx "$final_path"
|
||||
chown -R $app: "$final_path"
|
||||
|
||||
mkdir -p "$final_path/live/log"
|
||||
chown -R $app: "$final_path/live/log"
|
||||
mkdir -p "$final_path/live/public"
|
||||
chown -R $app: "$final_path/live/public"
|
||||
mkdir -p "$final_path/live/tmp"
|
||||
chown -R $app: "$final_path/live/tmp"
|
||||
chown $app: "$final_path/live/Gemfile.lock"
|
||||
|
||||
mkdir -p "/var/log/$app"
|
||||
chown -R $app: "/var/log/$app"
|
||||
|
|
|
@ -208,19 +208,16 @@ ynh_store_file_checksum --file="/etc/nginx/conf.d/$domain.d/$app.conf"
|
|||
ynh_script_progression --message="Securing files and directories..." --weight=2
|
||||
|
||||
# Set permissions to app files
|
||||
chown -R root:root "$final_path"
|
||||
chown $app: "$final_path"
|
||||
mkdir -p $app: "$final_path/.config"
|
||||
chown $app: "$final_path/.config"
|
||||
mkdir -p $app: "$final_path/.cache"
|
||||
chown $app: "$final_path/.cache"
|
||||
chmod 750 "$final_path"
|
||||
chmod -R o-rwx "$final_path"
|
||||
chown -R $app: "$final_path"
|
||||
|
||||
mkdir -p "$final_path/live/log"
|
||||
chown -R $app: "$final_path/live/log"
|
||||
mkdir -p "$final_path/live/public"
|
||||
chown -R $app: "$final_path/live/public"
|
||||
mkdir -p "$final_path/live/tmp"
|
||||
chown -R $app: "$final_path/live/tmp"
|
||||
chown $app: "$final_path/live/Gemfile.lock"
|
||||
|
||||
mkdir -p "/var/log/$app"
|
||||
chown -R $app: "/var/log/$app"
|
||||
|
|
Loading…
Add table
Reference in a new issue