mirror of
https://github.com/YunoHost-Apps/shaarli_ynh.git
synced 2024-09-03 20:26:10 +02:00
Merge pull request #77 from YunoHost-Apps/testing
Testing / fix permissions
This commit is contained in:
commit
f61a2392a4
6 changed files with 21 additions and 34 deletions
|
@ -30,7 +30,7 @@ Shaarli is a minimalist bookmark manager and link sharing service that you can i
|
|||
- feed other blogs, aggregators, social networks...
|
||||
|
||||
|
||||
**Shipped version:** 0.12.1~ynh2
|
||||
**Shipped version:** 0.12.1~ynh3
|
||||
|
||||
**Demo:** https://demo.shaarli.org/
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ Shaarli is a minimalist bookmark manager and link sharing service that you can i
|
|||
- feed other blogs, aggregators, social networks...
|
||||
|
||||
|
||||
**Version incluse :** 0.12.1~ynh2
|
||||
**Version incluse :** 0.12.1~ynh3
|
||||
|
||||
**Démo :** https://demo.shaarli.org/
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
"en": "The personal, minimalist, super-fast, no-database delicious clone",
|
||||
"fr": "Clone de delicious, rapide, simple et sans base de données"
|
||||
},
|
||||
"version": "0.12.1~ynh2",
|
||||
"version": "0.12.1~ynh3",
|
||||
"url": "https://github.com/shaarli/Shaarli",
|
||||
"upstream": {
|
||||
"license": "MIT",
|
||||
|
|
|
@ -74,10 +74,10 @@ ynh_app_setting_set --app=$app --key=final_path --value=$final_path
|
|||
# Download, check integrity, uncompress and patch the source from app.src
|
||||
ynh_setup_source --dest_dir="$final_path"
|
||||
|
||||
#chmod 750 "$final_path"
|
||||
#chmod -R o-rwx "$final_path"
|
||||
#chmod -R g+rwX $final_path/{cache/,data/,pagecache/,tmp/}
|
||||
#chown -R $app:www-data "$final_path"
|
||||
chmod 750 "$final_path"
|
||||
chmod -R o-rwx "$final_path"
|
||||
chmod -R u+rwX $final_path/{cache/,data/,pagecache/,tmp/}
|
||||
chown -R $app:www-data "$final_path"
|
||||
|
||||
#=================================================
|
||||
# NGINX CONFIGURATION
|
||||
|
@ -103,6 +103,7 @@ ynh_script_progression --message="Configuring log rotation..."
|
|||
# Use logrotate to manage application logfile(s)
|
||||
touch "$final_path/data/log.txt"
|
||||
ynh_use_logrotate "$final_path/data/log.txt"
|
||||
chown $app:www-data "$final_path/data/log.txt"
|
||||
|
||||
#=================================================
|
||||
# MODIFY A CONFIG FILE
|
||||
|
@ -131,16 +132,7 @@ fi
|
|||
|
||||
# Installing the config file and replace the placeholders
|
||||
ynh_add_config --template="../conf/config.json.php" --destination="$final_path/data/config.json.php"
|
||||
|
||||
#=================================================
|
||||
# SECURE FILES AND DIRECTORIES
|
||||
#=================================================
|
||||
# set proper permissions
|
||||
ynh_script_progression --message="Securing files and directories..."
|
||||
|
||||
chown -R $app: $final_path
|
||||
chmod -R g+rX $final_path
|
||||
chmod -R g+rwX $final_path/{cache/,data/,pagecache/,tmp/}
|
||||
chmod 700 "$final_path/data/config.json.php"
|
||||
|
||||
#=================================================
|
||||
# SETUP FAIL2BAN
|
||||
|
|
|
@ -61,14 +61,11 @@ ynh_script_progression --message="Restoring the app main directory..."
|
|||
|
||||
ynh_restore_file --origin_path="$final_path"
|
||||
|
||||
#=================================================
|
||||
# RESTORE USER RIGHTS
|
||||
#=================================================
|
||||
ynh_script_progression --message="Restoring user rights..."
|
||||
|
||||
chown -R $app: $final_path
|
||||
chmod -R g+rX $final_path
|
||||
chmod -R g+rwX $final_path/{cache/,data/,pagecache/,tmp/}
|
||||
chmod 750 "$final_path"
|
||||
chmod -R o-rwx "$final_path"
|
||||
chmod -R u+rwX $final_path/{cache/,data/,pagecache/,tmp/}
|
||||
chown -R $app:www-data "$final_path"
|
||||
chmod 700 "$final_path/data/config.json.php"
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE PHP-FPM CONFIGURATION
|
||||
|
|
|
@ -94,6 +94,12 @@ then
|
|||
ynh_secure_remove --file="$tmpdir"
|
||||
fi
|
||||
|
||||
chmod 750 "$final_path"
|
||||
chmod -R o-rwx "$final_path"
|
||||
chmod -R u+rwX $final_path/{cache/,data/,pagecache/,tmp/}
|
||||
chown -R $app:www-data "$final_path"
|
||||
chmod 700 "$final_path/data/config.json.php"
|
||||
|
||||
#=================================================
|
||||
# NGINX CONFIGURATION
|
||||
#=================================================
|
||||
|
@ -129,18 +135,10 @@ then
|
|||
ynh_secure_remove "$final_path/data/log.txt"
|
||||
touch "$final_path/data/log.txt"
|
||||
fi
|
||||
chown $app:www-data "$final_path/data/log.txt"
|
||||
|
||||
ynh_use_logrotate --non-append
|
||||
|
||||
#=================================================
|
||||
# SECURE FILES AND DIRECTORIES
|
||||
#=================================================
|
||||
ynh_script_progression --message="Securing files and directories..."
|
||||
|
||||
chown -R $app: $final_path
|
||||
chmod -R g+rX $final_path
|
||||
chmod -R g+rwX $final_path/{cache/,data/,pagecache/,tmp/}
|
||||
|
||||
#=================================================
|
||||
# UPGRADE FAIL2BAN
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue