This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 790042 - clamav+systemd=Can't create temporary directory ERROR
clamav+systemd=Can't create temporary directory ERROR
Status: CLOSED DUPLICATE of bug 790522
Product: Fedora
Classification: Fedora
Component: clamav (Show other bugs)
rawhide
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Enrico Scholz
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-02-13 09:40 EST by Nicolas Mailhot
Modified: 2012-02-28 03:58 EST (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-02-28 03:58:51 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Nicolas Mailhot 2012-02-13 09:40:10 EST
clamav's sysv amavisd-new service does not work anymore

/etc/init.d/clamd.amavisd: line 7: /usr/share/clamav/clamd-wrapper: No such file or directory

I figured it was a good time to switch to the systemd unit, and indeed it starts up fine

However it seems to have problems creating temporary files

 clamd[3637]: /var/spool/amavisd/tmp/amavis-20120211T120007-01177/parts/p002:
Can't create temporary directory ERROR

Maybe the systemd clamav unit needs some more magic to work with systemd's PrivateTmp feature?

(clamav amavisd conf taken from the amavisd-new package)

Version-Release number of selected component (if applicable):

amavisd-new-2.6.6-2.fc17.noarch
clamav-0.97.3-1703.fc17.x86_64
clamav-data-empty-0.97.3-1703.fc17.noarch
clamav-filesystem-0.97.3-1703.fc17.noarch
clamav-lib-0.97.3-1703.fc17.x86_64
clamav-server-0.97.3-1703.fc17.x86_64
clamav-server-systemd-0.97.3-1703.fc17.noarch
clamav-update-0.97.3-1703.fc17.x86_64
systemd-42-1.fc17.x86_64
Comment 1 Enrico Scholz 2012-02-15 05:55:01 EST
fwiw, the clamd-wrapper script is now in the clamav-server-sysvinit package (which is going to die in the midterm).

Can you point me to the mentioned systemd unit please? amavisd-new git does not contain a such one.

I am in doubt that your problem is caused by PrivateTmp, because this affects /tmp only, not /var/spool/...  Nevertheless, you can verify this by disabling PrivateTmp in the systemd unit (either clamd@.service, or in your clamd@<instance>.service file).
Comment 2 Nicolas Mailhot 2012-02-15 07:20:43 EST
(In reply to comment #1)
> fwiw, the clamd-wrapper script is now in the clamav-server-sysvinit package
> (which is going to die in the midterm).

That breaks amavid as it does not depend on this new package (but should move to systemd anyway → bug #789571)

> Can you point me to the mentioned systemd unit please? amavisd-new git does not
> contain a such one.

I just used the one in clamav systemd
systemctl start clamd@amavisd.service (IIRC) and it picked up the clamav config file shipped with the amavisd-new packages

ln -sf /lib/systemd/system/clamd@.service
/etc/systemd/system/multi-user.target.wants/clamd@amavisd.service

Only problems are those new tmp files errors (that didn't happen with the old sysv script): maybe it's the same as bug #790522 ?

and the pid file instruction in the amavisd-new config (is it necessary with systemd? Selinux does not like it: bug #789580)
Comment 3 Enrico Scholz 2012-02-17 09:00:24 EST
is this fixed by 790522#c19 ?

Creation of the pidfile can/should be avoided unless amavisd or system monitoring needs it.
Comment 4 Nicolas Mailhot 2012-02-17 10:07:09 EST
(In reply to comment #3)
> is this fixed by 790522#c19 ?
> 
> Creation of the pidfile can/should be avoided unless amavisd or system
> monitoring needs it.

the temporary file creation is indeed fixed by the new systemd

So, if you confirm there is no need to create the pid file, I should just ask the amavisd maintainer to remove the pid directive and use the generic clamav systemd unit, right?
Comment 5 Nicolas Mailhot 2012-02-28 03:58:51 EST

*** This bug has been marked as a duplicate of bug 790522 ***

Note You need to log in before you can comment on or make changes to this bug.