This one time, at band camp, Berg, Michael said:
> Stephen Gran wrote:
> > I have to say that's very strange.  Can you strace a startup of
> > freshclam for me?  I don't remember any umask calls in the database
> > writing code, but maybe I'm missing something.
> > 
> > Thanks,
> 
> Stephen,
> 
> Sorry for the delay on this (Christmas, New Year, etc), but I finally
> had some time to do more debugging. 

No problem.  Hope the holidays treated you well.

> $DatabaseOwner is "clamav", and I see the following behavior if I
> manually try that action broken up into several steps:
> 
> # id
> uid=0(root) gid=0(root) groups=0(root)
> # umask
> 0022
> 
> # su clamav -p -s /bin/sh
> $ id
> uid=108(clamav) gid=108(clamav) groups=108(clamav)
> $ umask
> 0077
> 
> If I then remove daily.cvd and run freshclam from this clamav shell, the
> resulting daily.cvd has mode 600.
> 
> So the source of the problem appears to be the umask changing to 0077
> when the script su's to the clamav user.

Odd, that doesn't happen here:

vancouver:~# id
uid=0(root) gid=0(root) groups=0(root)
vancouver:~# umask
0022
vancouver:~# su clamav -p -s /bin/sh
vancouver:~$ id
uid=108(clamav) gid=112(clamav) groups=112(clamav)
vancouver:~$ umask
0022
vancouver:~$

Do you set umask in /etc/profile or in a pam setting or something?
-- 
 -----------------------------------------------------------------
|   ,''`.                                            Stephen Gran |
|  : :' :                                        [EMAIL PROTECTED] |
|  `. `'                        Debian user, admin, and developer |
|    `-                                     http://www.debian.org |
 -----------------------------------------------------------------

Attachment: signature.asc
Description: Digital signature

Reply via email to