1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/wireguard_ynh.git synced 2024-09-03 20:35:58 +02:00

Fix permissions

This commit is contained in:
tituspijean 2021-07-04 21:43:22 +02:00
parent 9506dc0062
commit 01f21b05ea
3 changed files with 21 additions and 11 deletions

View file

@ -162,11 +162,13 @@ ynh_add_systemd_config --service=wireguard_ui_conf --template=wireguard_ui_conf.
#=================================================
# Set permissions to app files
chown -R root: $final_path
chown -R $app: $final_path/db
chmod -R 750 $final_path/db
chmod 750 "$final_path"
chmod -R o-rwx "$final_path"
chown -R $app: "$final_path"
chown -R $app:$app /etc/wireguard
chmod 750 /etc/wireguard
chmod -R o-rwx /etc/wireguard
chown -R $app: /etc/wireguard
#=================================================
# INTEGRATE SERVICE IN YUNOHOST

View file

@ -75,9 +75,13 @@ ynh_restore_file --origin_path="/etc/sudoers.d/${app}_ynh"
#=================================================
# Restore permissions on app files
chown -R root: $final_path
chown -R $app: $final_path/db
chmod -R 750 $final_path/db
chmod 750 "$final_path"
chmod -R o-rwx "$final_path"
chown -R $app: "$final_path"
chmod 750 /etc/wireguard
chmod -R o-rwx /etc/wireguard
chown -R $app: /etc/wireguard
#=================================================
# SPECIFIC RESTORATION

View file

@ -199,10 +199,14 @@ ynh_replace_string --match_string="__PORT_WG__" --replace_string="$port_wg" --ta
# SECURE FILES AND DIRECTORIES
#=================================================
# Set permissions on app files
chown -R root: $final_path
chown -R $app: $final_path/db
chmod -R 750 $final_path/db
# Set permissions to app files
chmod 750 "$final_path"
chmod -R o-rwx "$final_path"
chown -R $app: "$final_path"
chmod 750 /etc/wireguard
chmod -R o-rwx /etc/wireguard
chown -R $app: /etc/wireguard
#=================================================
# INTEGRATE SERVICE IN YUNOHOST