ANNOUNCE: Beta release 4.25-6

Julian Field mailscanner at ecs.soton.ac.uk
Mon Nov 10 10:23:35 GMT 2003


At 22:25 09/11/2003, you wrote:
>On Fri, 2003-11-07 at 14:47, Julian Field wrote:
>
> >I have added support for changing the uid, gid and permissions on files
> >and
> >directories within the quarantine area and "incoming work dir"
> >temporary
> >files area.
>
>I'm having problems with this feature.  It seems that the chgrp is
>recursing.
>
>I set
>    Incoming Work Group = clamav
>    Incoming Work Permissions = 0640
>and stuck an
>ls -l >> /tmp/clamout
>into the clamav wrapper (so I could see why it wasn't working)
>Heres an extract from that file (just for one message containing
>eicar.zip)...
>
>
>###### START OUTPUT #####
>total 4
>drwxr-x---    2 root     clamav          0 Nov  9 22:19 hA9MJH3S020594
>-rw-r-----    1 root     clamav       1750 Nov  9 22:19
>hA9MJH3S020594.header
>
>./hA9MJH3S020594:
>total 12
>-rw-r-----    1 root     root          186 Nov  9 22:19 eicar.zip
>-rw-r-----    1 root     root          378 Nov  9 22:19 msg-19754-7.txt
>-rw-r-----    1 root     root          189 Nov  9 22:19 signature.asc
>###### END OUTPUT ######
>
>As you can see the mode has been applied correctly but the group setting
>has not.

Well spotted. This patch to Message.pm should fix it.
--- Message.pm.old 2003-11-07 12:30:38.000000000 +0000
+++ Message.pm  2003-11-10 10:21:29.000000000 +0000
@@ -854,6 +854,10 @@
        }
      }
    }
+
+  # Set the owner and group on all the extracted files
+  chown $workarea->{uid}, $workarea->{gid}, glob "$explodeinto/*"
+    if $workarea->{changeowner};
  }


--
Julian Field
www.MailScanner.info
MailScanner thanks transtec Computers for their support

PGP footprint: EE81 D763 3DB0 0BFD E1DC  7222 11F6 5947 1415 B654



More information about the MailScanner mailing list