mirror of
https://github.com/YunoHost-Apps/agendav_ynh.git
synced 2024-09-03 20:36:12 +02:00
[fix] Properly chmod installed files. Fixes #19
This commit is contained in:
parent
318cec9dd5
commit
c7acda299d
2 changed files with 5 additions and 2 deletions
|
@ -77,12 +77,14 @@ sed -i "s@{CALDAV_DOMAIN}@${caldav_domain}@g" "$conf_path"
|
||||||
|
|
||||||
# Install files and set permissions
|
# Install files and set permissions
|
||||||
sudo mv "$TMPDIR" "$DESTDIR"
|
sudo mv "$TMPDIR" "$DESTDIR"
|
||||||
|
|
||||||
sudo useradd -c "$app system account" \
|
sudo useradd -c "$app system account" \
|
||||||
-d /var/www/$app --system --user-group $app --shell /usr/sbin/nologin \
|
-d /var/www/$app --system --user-group $app --shell /usr/sbin/nologin \
|
||||||
|| ynh_die "Unable to create $app system account"
|
|| ynh_die "Unable to create $app system account"
|
||||||
|
|
||||||
# Protect source code against modifications
|
# Protect source code against modifications
|
||||||
sudo chown -hR root: "$DESTDIR"
|
sudo find "${DESTDIR}" -type f -exec chown root:root {} \; -exec chmod 644 {} \;
|
||||||
|
sudo find "${DESTDIR}" -type d -exec chown root:root {} \; -exec chmod 755 {} \;
|
||||||
|
|
||||||
# Only agendav user should write here
|
# Only agendav user should write here
|
||||||
sudo chown -hR $app: "${DESTDIR}/web/var/cache/"{profiler,twig}
|
sudo chown -hR $app: "${DESTDIR}/web/var/cache/"{profiler,twig}
|
||||||
|
|
|
@ -85,7 +85,8 @@ if ! id -u $app > /dev/null 2>&1 ; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Protect source code against modifications
|
# Protect source code against modifications
|
||||||
sudo chown -hR root: "$DESTDIR"
|
sudo find "${DESTDIR}" -type f -exec chown root:root {} \; -exec chmod 644 {} \;
|
||||||
|
sudo find "${DESTDIR}" -type d -exec chown root:root {} \; -exec chmod 755 {} \;
|
||||||
|
|
||||||
# Only agendav user should write here
|
# Only agendav user should write here
|
||||||
sudo chown -hR $app: "${DESTDIR}/web/var/cache/"{profiler,twig}
|
sudo chown -hR $app: "${DESTDIR}/web/var/cache/"{profiler,twig}
|
||||||
|
|
Loading…
Add table
Reference in a new issue