mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-13 13:15:30 +03:00
nextcloud: fix group permissions on startup
This commit is contained in:
parent
fd9eb16b24
commit
5823ed7841
1 changed files with 11 additions and 1 deletions
|
@ -458,7 +458,17 @@ in {
|
||||||
script = ''
|
script = ''
|
||||||
chmod og+x ${cfg.home}
|
chmod og+x ${cfg.home}
|
||||||
ln -sf ${cfg.package}/apps ${cfg.home}/
|
ln -sf ${cfg.package}/apps ${cfg.home}/
|
||||||
install -o nextcloud -g nextcloud -d ${cfg.home}/config ${cfg.home}/data ${cfg.home}/store-apps
|
|
||||||
|
# create nextcloud directories.
|
||||||
|
# if the directories exist already with wrong permissions, we fix that
|
||||||
|
for dir in ${cfg.home}/config ${cfg.home}/data ${cfg.home}/store-apps; do
|
||||||
|
if [ ! -e $dir ]; then
|
||||||
|
install -o nextcloud -g nextcloud -d $dir
|
||||||
|
elif [ $(stat -c "%G" $dir) != "nextcloud" ]; then
|
||||||
|
chown -R nextcloud:nextcloud $dir
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
ln -sf ${overrideConfig} ${cfg.home}/config/override.config.php
|
ln -sf ${overrideConfig} ${cfg.home}/config/override.config.php
|
||||||
|
|
||||||
# Do not install if already installed
|
# Do not install if already installed
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue