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"
|
chmod -R o-rwx "$datadir"
|
||||||
chown -R $app:www-data "$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
|
# ADD A CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -119,8 +119,8 @@ ynh_remove_app_dependencies
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Removing various files..." --weight=1
|
ynh_script_progression --message="Removing various files..." --weight=1
|
||||||
|
|
||||||
# Remove a directory securely
|
# Remove temp directory securely
|
||||||
#ynh_secure_remove --file="/etc/$app"
|
ynh_secure_remove --file="/tmp/$app"
|
||||||
|
|
||||||
# Remove the log files
|
# Remove the log files
|
||||||
ynh_secure_remove --file="/var/log/$app"
|
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"
|
chmod 400 "$final_path/paperless.conf"
|
||||||
chown $app:$app "$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
|
# SETUP THE DATABASE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Reference in a new issue