mirror of
https://github.com/YunoHost-Apps/dokuwiki_ynh.git
synced 2024-09-03 18:26:20 +02:00
fix copied files being owned by root and not app user
This commit is contained in:
parent
0473c71a35
commit
4802b254bf
2 changed files with 11 additions and 11 deletions
|
@ -141,20 +141,20 @@ ynh_add_config --template="../conf/acl.auth.php" --destination="$final_path/conf
|
|||
# Other files will be read ony and owned by root.
|
||||
# See https://www.dokuwiki.org/install:permissions
|
||||
|
||||
cp $final_path/conf/local.php.dist $final_path/conf/local.php.bak
|
||||
cp $final_path/conf/users.auth.php.dist $final_path/conf/users.auth.php
|
||||
cp --archive $final_path/conf/local.php.dist $final_path/conf/local.php.bak
|
||||
cp --archive $final_path/conf/users.auth.php.dist $final_path/conf/users.auth.php
|
||||
|
||||
# This file might be used by plugins like https://www.dokuwiki.org/plugin:siteexport
|
||||
# Create it to be more "user friendly" as over the top security is not the main goal here
|
||||
# This file could be use for bad behaviour.
|
||||
# See https://www.dokuwiki.org/devel:preload?s[]=preload
|
||||
cp $final_path/inc/preload.php.dist $final_path/inc/preload.php
|
||||
cp --archive $final_path/inc/preload.php.dist $final_path/inc/preload.php
|
||||
|
||||
# There is no template .dist provided inside DokuWiki installation folder
|
||||
# Create "empty" files to be able to manage linux permissions
|
||||
# Files content is taken from an existing DokuWiki installation
|
||||
cp ../conf/plugins.local.php $final_path/conf
|
||||
cp ../conf/plugins.local.php $final_path/conf/plugins.local.php.bak
|
||||
cp --archive ../conf/plugins.local.php $final_path/conf
|
||||
cp --archive ../conf/plugins.local.php $final_path/conf/plugins.local.php.bak
|
||||
|
||||
#=================================================
|
||||
# STORE THE CHECKSUM OF THE CONFIG FILE
|
||||
|
|
|
@ -143,22 +143,22 @@ if [ ! -f "$final_path/conf/local.php.bak" ]; then
|
|||
# if template exists
|
||||
if [ -f "$final_path/conf/local.php.dist" ]; then
|
||||
# Copy template to create default file
|
||||
cp "$final_path/conf/local.php.dist" "$final_path/conf/local.php.bak"
|
||||
cp --archive "$final_path/conf/local.php.dist" "$final_path/conf/local.php.bak"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ ! -f "$final_path/conf/users.auth.php" ]; then
|
||||
if [ -f "$final_path/conf/users.auth.php.dist" ]; then
|
||||
cp $final_path/conf/users.auth.php.dist $final_path/conf/users.auth.php
|
||||
cp --archive $final_path/conf/users.auth.php.dist $final_path/conf/users.auth.php
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ ! -f "$final_path/conf/plugins.local.php" ]; then
|
||||
cp ../conf/plugins.local.php $final_path/conf
|
||||
cp --archive ../conf/plugins.local.php $final_path/conf
|
||||
fi
|
||||
|
||||
if [ ! -f "$final_path/conf/plugins.local.php.bak" ]; then
|
||||
cp ../conf/plugins.local.php $final_path/conf/plugins.local.php.bak
|
||||
cp --archive ../conf/plugins.local.php $final_path/conf/plugins.local.php.bak
|
||||
fi
|
||||
|
||||
|
||||
|
@ -166,7 +166,7 @@ if [ ! -f "$final_path/inc/preload.php" ]; then
|
|||
# if template exists
|
||||
if [ -f "$final_path/inc/preload.php.dist" ]; then
|
||||
# Copy template to create default file
|
||||
cp "$final_path/inc/preload.php.dist" "$final_path/inc/preload.php"
|
||||
cp --archive "$final_path/inc/preload.php.dist" "$final_path/inc/preload.php"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@ -315,7 +315,7 @@ fi
|
|||
ynh_backup_if_checksum_is_different --file="$final_path/conf/local.protected.php"
|
||||
|
||||
# Always overwrite local file with the one from package.
|
||||
cp ../conf/local.protected.php $final_path/conf
|
||||
cp --archive ../conf/local.protected.php $final_path/conf
|
||||
|
||||
# Customize admin group in case of multiple wiki install managed by different admins
|
||||
# dokuwiki.admin; dokuwiki__1.admin; etc
|
||||
|
|
Loading…
Add table
Reference in a new issue