Discussion:
[Dnsmasq-discuss] How to set umask for logfile?
BUGHUNTER
2018-01-12 13:17:37 UTC
Permalink
Hi,

I am trying to set the umask for the logfile generated by dnsmaq, but it seems to ignore the way I
am doing it.

System: Ubuntu 16.04

/etc/dnsmasq.d/local.conf:
log-facility=/var/log/dnsmasq.log
log-queries

Then I am creating a systemd override like described here:
https://serverfault.com/questions/582371/how-to-set-umask-for-php-fpm-in-fedora

systemctl edit dnsmasq.service.
add:
[Service]
UMask=0002

systemctl reenable dnsmasq.service

The logfile is written, but the umask is not set as expected.

Questions:

Why is this setting ignored?

How can I set the umask I would like to have?

Thanks!
Bughunter
Simon Kelley
2018-01-12 16:23:38 UTC
Permalink
The process umask is explicitly set to 022 in dnsmasq.c, to change that,
you're going to have to edit the source and recompile.

Cheers,

Simon.
Post by BUGHUNTER
Hi,
I am trying to set the umask for the logfile generated by dnsmaq, but it
seems to ignore the way I am doing it.
System: Ubuntu 16.04
log-facility=/var/log/dnsmasq.log
log-queries
https://serverfault.com/questions/582371/how-to-set-umask-for-php-fpm-in-fedora
systemctl edit dnsmasq.service.
[Service]
UMask=0002
systemctl reenable dnsmasq.service
The logfile is written, but the umask is not set as expected.
Why is this setting ignored?
How can I set the umask I would like to have?
Thanks!
Bughunter
_______________________________________________
Dnsmasq-discuss mailing list
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
BUGHUNTER
2018-01-13 00:17:02 UTC
Permalink
Post by Simon Kelley
The process umask is explicitly set to 022 in dnsmasq.c, to change that,
you're going to have to edit the source and recompile.
thanks for the info!

have a nice day!
Bughunter

Loading...