mirror of
https://github.com/YunoHost-Apps/paperless-ngx_ynh.git
synced 2024-09-03 19:56:33 +02:00
Ensures temp dir ownership
This commit is contained in:
parent
69f0a2c48e
commit
1bebd75c16
3 changed files with 20 additions and 2 deletions
|
@ -156,6 +156,15 @@ chmod 750 "$datadir"
|
|||
chmod -R o-rwx "$datadir"
|
||||
chown -R $app:www-data "$datadir"
|
||||
|
||||
#=================================================
|
||||
# CREATE TEMP DIRECTORY
|
||||
#=================================================
|
||||
ynh_script_progression --message="Creating temp directory..." --weight=1
|
||||
mkdir -p "/tmp/$app"
|
||||
chmod 700 "/tmp/$app"
|
||||
chmod -R go-rwx "/tmp/$app"
|
||||
chown -R $app:$app "/tmp/$app"
|
||||
|
||||
#=================================================
|
||||
# ADD A CONFIGURATION
|
||||
#=================================================
|
||||
|
|
|
@ -119,8 +119,8 @@ ynh_remove_app_dependencies
|
|||
#=================================================
|
||||
ynh_script_progression --message="Removing various files..." --weight=1
|
||||
|
||||
# Remove a directory securely
|
||||
#ynh_secure_remove --file="/etc/$app"
|
||||
# Remove temp directory securely
|
||||
ynh_secure_remove --file="/tmp/$app"
|
||||
|
||||
# Remove the log files
|
||||
ynh_secure_remove --file="/var/log/$app"
|
||||
|
|
|
@ -147,6 +147,15 @@ ynh_add_config --template="paperless.conf.example" --destination="$final_path/pa
|
|||
chmod 400 "$final_path/paperless.conf"
|
||||
chown $app:$app "$final_path/paperless.conf"
|
||||
|
||||
#=================================================
|
||||
# ENSURE TEMP DIR OWNERSHIP
|
||||
#=================================================
|
||||
ynh_script_progression --message="Updating temp directory ownership..." --weight=1
|
||||
mkdir -p "/tmp/$app"
|
||||
chmod 700 "/tmp/$app"
|
||||
chmod -R go-rwx "/tmp/$app"
|
||||
chown -R $app:$app "/tmp/$app"
|
||||
|
||||
#=================================================
|
||||
# SETUP THE DATABASE
|
||||
#=================================================
|
||||
|
|
Loading…
Reference in a new issue