1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/nextcloud_ynh.git synced 2024-09-03 19:55:57 +02:00

only nextcloud is allowed to read the config file

This commit is contained in:
Kayou 2024-08-01 00:16:45 +02:00 committed by GitHub
parent 30b2d8123a
commit 55b5c7900f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 6 additions and 3 deletions

View file

@ -65,6 +65,7 @@ exec_occ() {
# Set write access for the following commands
chown -R $app:www-data "$install_dir"
chmod 600 "$install_dir/config/config.php"
chown -R $app: "$data_dir"
# Define password in an intermediate var
@ -241,7 +242,7 @@ find $install_dir/ -type f -print0 | xargs -r0 chmod 0644
find $install_dir/ -type d -print0 | xargs -r0 chmod 0755
find $data_dir/data/ -type f -print0 | xargs -r0 chmod 0640
find $data_dir/data/ -type d -print0 | xargs -r0 chmod 0750
chmod 640 "$install_dir/config/config.php"
chmod 600 "$install_dir/config/config.php"
chmod 755 /home/yunohost.app
chmod 750 $install_dir

View file

@ -85,7 +85,7 @@ find $install_dir/ -type f -print0 | xargs -r0 chmod 0644
find $install_dir/ -type d -print0 | xargs -r0 chmod 0755
find $data_dir/data/ -type f -print0 | xargs -r0 chmod 0640
find $data_dir/data/ -type d -print0 | xargs -r0 chmod 0750
chmod 640 "$install_dir/config/config.php"
chmod 600 "$install_dir/config/config.php"
chmod 755 /home/yunohost.app
chmod 750 $install_dir

View file

@ -139,6 +139,7 @@ then
# Set write access for the following commands
chown -R $app:www-data "$install_dir"
chmod 600 "$install_dir/config/config.php"
# Print the current version number of Nextcloud
exec_occ -V
@ -208,6 +209,7 @@ then
# Set write access for the following commands
chown -R $app:www-data "$install_dir"
chmod 600 "$install_dir/config/config.php"
# Upgrade Nextcloud (SUCCESS = 0, UP_TO_DATE = 3)
exec_occ maintenance:mode --off
@ -327,7 +329,7 @@ ynh_script_progression --message="Reapplying file permissions..." --weight=2
chown -R $app:www-data "$install_dir"
find $install_dir/ -type f -print0 | xargs -r0 chmod 0644
find $install_dir/ -type d -print0 | xargs -r0 chmod 0755
chmod 640 "$install_dir/config/config.php"
chmod 600 "$install_dir/config/config.php"
chmod 755 /home/yunohost.app
chmod 750 $install_dir