mirror of
https://github.com/YunoHost-Apps/wallabag2_ynh.git
synced 2024-10-01 13:35:06 +02:00
Tighten permissions
This commit is contained in:
parent
0303873f6e
commit
07f70541b8
3 changed files with 19 additions and 10 deletions
|
@ -160,12 +160,13 @@ ynh_add_fail2ban_config --logpath="/var/www/$app/var/logs/prod.log" --failregex=
|
|||
# SECURE FILES AND DIRECTORIES
|
||||
#=================================================
|
||||
|
||||
# Set permissions to app files
|
||||
chown -R $app:www-data $final_path
|
||||
chmod -R g=u,g-w,o-rwx $final_path
|
||||
|
||||
# Restrict rights to Wallabag user only
|
||||
chmod 600 $wb_conf
|
||||
|
||||
# Set permissions to app files
|
||||
chown -R $app: $final_path
|
||||
chmod 755 $final_path
|
||||
chmod 700 $final_path/var/cache/prod/appProdProjectContainer.php -f
|
||||
|
||||
#=================================================
|
||||
# SETUP HOOKS
|
||||
|
|
|
@ -66,8 +66,15 @@ ynh_system_user_create --username=$app
|
|||
# RESTORE USER RIGHTS
|
||||
#=================================================
|
||||
|
||||
# Restore permissions on app files
|
||||
chown -R $app: $final_path
|
||||
wb_conf=$final_path/app/config/parameters.yml
|
||||
|
||||
# Set permissions to app files
|
||||
chown -R $app:www-data $final_path
|
||||
chmod -R g=u,g-w,o-rwx $final_path
|
||||
|
||||
# Restrict rights to Wallabag user only
|
||||
chmod 600 $wb_conf
|
||||
chmod 700 $final_path/var/cache/prod/appProdProjectContainer.php -f
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE PHP-FPM CONFIGURATION
|
||||
|
|
|
@ -191,12 +191,13 @@ fi
|
|||
# SECURE FILES AND DIRECTORIES
|
||||
#=================================================
|
||||
|
||||
# Set permissions to app files
|
||||
chown -R $app:www-data $final_path
|
||||
chmod -R g=u,g-w,o-rwx $final_path
|
||||
|
||||
# Restrict rights to Wallabag user only
|
||||
chmod 600 $wb_conf
|
||||
|
||||
# Set permissions to app files
|
||||
chown -R $app: $final_path
|
||||
chmod 755 $final_path
|
||||
chmod 700 $final_path/var/cache/prod/appProdProjectContainer.php -f
|
||||
|
||||
#=================================================
|
||||
# SETUP HOOKS
|
||||
|
|
Loading…
Add table
Reference in a new issue