mirror of
https://github.com/pi-hole/pi-hole.git
synced 2025-04-22 07:10:19 +00:00
Remove read permission for others on senible log files
Signed-off-by: Christian König <ckoenig@posteo.de>
This commit is contained in:
parent
b20aa865b9
commit
954a0c2a14
3 changed files with 6 additions and 5 deletions
|
@ -1394,7 +1394,7 @@ curl_to_tricorder() {
|
|||
upload_to_tricorder() {
|
||||
local username="pihole"
|
||||
# Set the permissions and owner
|
||||
chmod 644 ${PIHOLE_DEBUG_LOG}
|
||||
chmod 640 ${PIHOLE_DEBUG_LOG}
|
||||
chown "$USER":"${username}" ${PIHOLE_DEBUG_LOG}
|
||||
|
||||
# Let the user know debugging is complete with something strikingly visual
|
||||
|
|
|
@ -46,7 +46,7 @@ if [[ "$@" == *"once"* ]]; then
|
|||
# moved file (it will have the same file handler)
|
||||
cp -p /var/log/pihole/pihole.log /var/log/pihole/pihole.log.1
|
||||
echo " " > /var/log/pihole/pihole.log
|
||||
chmod 644 /var/log/pihole/pihole.log
|
||||
chmod 640 /var/log/pihole/pihole.log
|
||||
fi
|
||||
else
|
||||
# Manual flushing
|
||||
|
@ -59,7 +59,7 @@ else
|
|||
echo " " > /var/log/pihole/pihole.log
|
||||
if [ -f /var/log/pihole/pihole.log.1 ]; then
|
||||
echo " " > /var/log/pihole/pihole.log.1
|
||||
chmod 644 /var/log/pihole/pihole.log.1
|
||||
chmod 640 /var/log/pihole/pihole.log.1
|
||||
fi
|
||||
fi
|
||||
# Delete most recent 24 hours from FTL's database, leave even older data intact (don't wipe out all history)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue