1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/nitter_ynh.git synced 2024-09-03 19:46:24 +02:00

Restrict permissions on app dir

This commit is contained in:
Jules Bertholet 2021-03-22 15:30:56 -04:00
parent b527a4cd94
commit 4db619a75f
4 changed files with 21 additions and 15 deletions

View file

@ -6,7 +6,7 @@
"en": "Alternative front-end for Twitter that respects your privacy",
"fr": "Interface alternative pour Twitter qui respecte votre vie privée"
},
"version": "0.2021.02.16~ynh1",
"version": "0.2021.02.16~ynh2",
"url": "https://github.com/zedeus/nitter",
"license": "AGPL-3.0-only",
"maintainer": {

View file

@ -232,8 +232,10 @@ ynh_add_config --template="nitter.conf" --destination="$final_path/nitter.conf"
### that really need such authorization.
# Set permissions to app files
chown -R root: $final_path
chown -R $app: $final_path/tmp
chown -R root:$app $final_path
chown -R $app:$app $final_path/tmp
chmod -R o-rwx $final_path
chmod -R g-w $final_path
#=================================================
# INTEGRATE SERVICE IN YUNOHOST

View file

@ -65,16 +65,6 @@ ynh_script_progression --message="Recreating the dedicated system user..." --wei
# Create the dedicated user (if not existing)
ynh_system_user_create --username=$app
#=================================================
# RESTORE USER RIGHTS
#=================================================
# Restore permissions on app files
chown -R root: $final_path
chown -R $app: $final_path/tmp
#=================================================
# SPECIFIC RESTORATION
#=================================================
# REINSTALL DEPENDENCIES
#=================================================
@ -83,6 +73,18 @@ ynh_script_progression --message="Reinstalling dependencies..." --weight=1
# Define and install dependencies
ynh_install_app_dependencies $pkg_dependencies
#=================================================
# RESTORE USER RIGHTS
#=================================================
# Restore permissions on app files
chown -R root:$app $final_path
chown -R $app:$app $final_path/tmp
chmod -R o-rwx $final_path
chmod -R g-w $final_path
#=================================================
# SPECIFIC RESTORATION
#=================================================
# RESTORE SYSTEMD
#=================================================

View file

@ -151,8 +151,10 @@ ynh_add_config --template="nitter.conf" --destination="$final_path/nitter.conf"
#=================================================
# Set permissions on app files
chown -R root: $final_path
chown -R $app: $final_path/tmp
chown -R root:$app $final_path
chown -R $app:$app $final_path/tmp
chmod -R o-rwx $final_path
chmod -R g-w $final_path
#=================================================
# INTEGRATE SERVICE IN YUNOHOST