Set the permissions for the database explicitly

This makes the gravity.sh script set the right permissions for the pihole directory and the database file explicitly.
This commit is contained in:
chr0m3kanra 2022-02-15 15:18:47 +00:00 committed by GitHub
parent 6ffa2ba1b2
commit 8a073604a5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1012,8 +1012,10 @@ fi
update_gravity_timestamp
# Ensure proper permissions are set for the database
chown root:pihole "${piholeDir}"
chmod 0775 "${piholeDir}"
chown pihole:pihole "${gravityDBfile}"
chmod g+w "${piholeDir}" "${gravityDBfile}"
chmod 0664 "${gravityDBfile}"
# Compute numbers to be displayed
gravity_ShowCount