[Dnsmasq-discuss] How to set umask for logfile?

Simon Kelley simon at thekelleys.org.uk
Fri Jan 12 16:23:38 GMT 2018


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.


On 12/01/18 13:17, BUGHUNTER wrote:
> 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
> 
> _______________________________________________
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss at lists.thekelleys.org.uk
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
> 



More information about the Dnsmasq-discuss mailing list