p002: Can't create temporary directory ERROR

Discussion in 'Installation/Configuration' started by Steffan, Apr 6, 2018.

  1. Steffan

    Steffan Member

    hello i see a ald tread but no solution.
    Tryed several google search results.
    Anyone having the same problem?
    have a clue what to do?

    Im getting a lot of errors like:

    Apr 6 14:29:45 mail01 clamd[464]: /var/spool/amavisd/tmp/amavis-20180406T142647-19732-3QNQQMSF/parts/p003: Can't create temporary directory ERROR
    Apr 6 14:29:51 mail01 clamd[464]: /var/spool/amavisd/tmp/amavis-20180406T142808-21427-Qq85UQcF/parts/p002: Can't create temporary directory ERROR
    Apr 6 14:30:00 mail01 clamd[464]: /var/spool/amavisd/tmp/amavis-20180406T142647-19732-3QNQQMSF/parts/p002: Can't create temporary directory ERROR
    Apr 6 14:30:01 mail01 clamd[464]: /var/spool/amavisd/tmp/amavis-20180406T142808-21427-Qq85UQcF/parts/p002: Can't create temporary directory ERROR
    Apr 6 14:30:09 mail01 clamd[464]: /var/spool/amavisd/tmp/amavis-20180406T142808-21427-Qq85UQcF/parts/p002: Can't create temporary directory ERROR
    Apr 6 14:30:19 mail01 clamd[464]: /var/spool/amavisd/tmp/amavis-20180406T142647-19732-3QNQQMSF/parts/p002: Can't create temporary directory ERROR
    Apr 6 14:30:32 mail01 clamd[464]: /var/spool/amavisd/tmp/amavis-20180406T142808-21427-Qq85UQcF/parts/p002: Can't create temporary directory ERROR

    below some directory settings.
    [[email protected] tmp]# ls -al /var/spool/amavisd/tmp/amavis-20180406T142808-21427-Qq85UQcF/parts
    total 8
    drwxr-x--- 2 amavis amavis 4096 Apr 6 14:31 .
    drwxr-x--- 3 amavis amavis 4096 Apr 6 14:28 ..

    [[email protected] tmp]# ls -al /var/spool/amavisd/tmp/amavis-20180406T142808-21427-Qq85UQcF/
    total 48
    drwxr-x--- 3 amavis amavis 4096 Apr 6 14:28 .
    drwxr-x--- 3 amavis amavis 20480 Apr 6 14:31 ..
    -rw-r----- 1 amavis amavis 19127 Apr 6 14:31 email.txt
    drwxr-x--- 2 amavis amavis 4096 Apr 6 14:31 parts

    [[email protected] tmp]# ls -al /var/spool/amavisd/tmp
    total 28
    drwxr-x--- 3 amavis amavis 20480 Apr 6 14:31 .
    drwxr-x--- 8 amavis amavis 4096 Apr 6 05:19 ..
    drwxr-x--- 3 amavis amavis 4096 Apr 6 14:28 amavis-20180406T142808-21427-Qq85UQcF

    [[email protected] tmp]# ls -al /var/spool/amavisd/
    total 48
    drwxr-x--- 8 amavis amavis 4096 Apr 6 05:19 .
    drwxr-xr-x 11 root root 4096 Feb 22 2017 ..
    drwxr-x--- 2 amavis amavis 4096 Feb 15 2017 .razor
    drwx------ 2 amavis amavis 4096 Apr 6 14:31 .spamassassin
    srwxr-x--- 1 amavis amavis 0 Apr 6 05:19 amavisd.sock
    drwxr-x--- 2 amavis amavis 4096 Apr 6 05:19 db
    drwxr-x--- 2 amavis amavis 4096 Dec 12 13:12 quarantine
    drwxr-x--- 3 amavis amavis 20480 Apr 6 14:31 tmp
    drwx------ 4 amavis amavis 4096 Nov 8 15:16 var
     
  2. Jesse Norell

    Jesse Norell Well-Known Member

    I don't see any obvious permission problems; make sure your filesystem is not full (is /var/spool/amavisd/tmp/ on root filesystem, or tmpfs, or ???). Maybe run 'dmesg' and check /var/log/ files for any errors. Can you create that p002 directory as root?
     
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    Check if the clamav user is member of the amavis group. Here an example from /etc/group file on Debian 9:

    amavis:x:120:clamav
     
  4. Steffan

    Steffan Member

    Its centos 7

    cat /etc/group | grep amavis
    amavis:x:993:

    cat /etc/group | grep clam
    clamupdate:x:994:
    clamscan:x:990:
    virusgroup:x:988:clamupdate,clamscan

    i added clamscan to amavis but that didt help.

    Strange thing is:
    Apr 13 09:52:17 mail01 clamd[464]: /var/spool/amavisd/tmp/amavis-20180413T095217-15076-37yMi2gl/parts/p002: Can't create temporary directory ERROR
    Apr 13 09:52:46 mail01 clamd[464]: /var/spool/amavisd/tmp/amavis-20180413T095217-15076-37yMi2gl/parts/p002: Can't create temporary directory ERROR
    Apr 13 09:52:46 mail01 clamd[464]: /var/spool/amavisd/tmp/amavis-20180413T095217-15076-37yMi2gl/parts/p005: Can't create temporary directory ERROR
    Apr 13 09:53:47 mail01 clamd[464]: /var/spool/amavisd/tmp/amavis-20180413T095217-15076-37yMi2gl/parts/p002: Can't create temporary directory ERROR
    Apr 13 09:53:47 mail01 clamd[464]: /var/spool/amavisd/tmp/amavis-20180413T095217-15076-37yMi2gl/parts/p003: Can't create temporary directory ERROR
    Apr 13 09:53:59 mail01 clamd[464]: /var/spool/amavisd/tmp/amavis-20180413T095217-15076-37yMi2gl/parts/p002: Can't create temporary directory ERROR
    Apr 13 09:54:48 mail01 clamd[464]: /var/spool/amavisd/tmp/amavis-20180413T095217-15076-37yMi2gl/parts/p002: Can't create temporary directory ERROR
    Apr 13 09:55:11 mail01 clamd[464]: /var/spool/amavisd/tmp/amavis-20180413T095217-15076-37yMi2gl/parts/p002: Can't create temporary directory ERROR
    Apr 13 09:55:33 mail01 clamd[464]: /var/spool/amavisd/tmp/amavis-20180413T095217-15076-37yMi2gl/parts/p002: Can't create temporary directory ERROR
    Apr 13 09:55:42 mail01 clamd[464]: /var/spool/amavisd/tmp/amavis-20180413T095217-15076-37yMi2gl/parts/p002: Can't create temporary directory ERROR
    Apr 13 09:56:05 mail01 clamd[464]: /var/spool/amavisd/tmp/amavis-20180413T095217-15076-37yMi2gl/parts/p002: Can't create temporary directory ERROR
    Apr 13 09:56:22 mail01 clamd[464]: /var/spool/amavisd/tmp/amavis-20180413T095217-15076-37yMi2gl/parts/p002: Can't create temporary directory ERROR
    Apr 13 09:56:36 mail01 clamd[464]: /var/spool/amavisd/tmp/amavis-20180413T095217-15076-37yMi2gl/parts/p002: Can't create temporary directory ERROR
    Apr 13 09:56:36 mail01 clamd[464]: /var/spool/amavisd/tmp/amavis-20180413T095217-15076-37yMi2gl/parts/p004: Can't create temporary directory ERROR
    Apr 13 09:56:36 mail01 clamd[464]: /var/spool/amavisd/tmp/amavis-20180413T095217-15076-37yMi2gl/parts/p005: Can't create temporary directory ERROR
    Apr 13 09:56:48 mail01 clamd[464]: /var/spool/amavisd/tmp/amavis-20180413T095217-15076-37yMi2gl/parts/p002: Can't create temporary directory ERROR
    Apr 13 09:56:54 mail01 clamd[464]: /var/spool/amavisd/tmp/amavis-20180413T095217-15076-37yMi2gl/parts/p002: Can't create temporary directory ERROR
    Apr 13 09:57:16 mail01 clamd[464]: /var/spool/amavisd/tmp/amavis-20180413T095217-15076-37yMi2gl/parts/p002: Can't create temporary directory ERROR
    Apr 13 09:57:17 mail01 clamd[464]: /var/spool/amavisd/tmp/amavis-20180413T095217-15076-37yMi2gl/parts/p004: Can't create temporary directory ERROR
    Apr 13 09:57:33 mail01 clamd[464]: /var/spool/amavisd/tmp/amavis-20180413T095217-15076-37yMi2gl/parts/p002: Can't create temporary directory ERROR
    Apr 13 09:57:46 mail01 clamd[464]: /var/spool/amavisd/tmp/amavis-20180413T095217-15076-37yMi2gl/parts/p002: Can't create temporary directory ERROR
    Apr 13 09:58:09 mail01 clamd[464]: /var/spool/amavisd/tmp/amavis-20180413T095217-15076-37yMi2gl/parts/p002: Can't create temporary directory ERROR
    Apr 13 09:58:21 mail01 clamd[464]: /var/spool/amavisd/tmp/amavis-20180413T095217-15076-37yMi2gl/parts/p002: Can't create temporary directory ERROR

    ls -sl /var/spool/amavisd/tmp/amavis-20180413T095217-15076-37yMi2gl/parts/p002
    ls: cannot access /var/spool/amavisd/tmp/amavis-20180413T095217-15076-37yMi2gl/parts/p002: No such file or directory

    but a few seconds later:
    ls -sl /var/spool/amavisd/tmp/amavis-20180413T095217-15076-37yMi2gl/parts/
    total 808
    4 -rw-r----- 1 amavis amavis 175 Apr 13 09:56 p001
    4 -rw-r----- 1 amavis amavis 576 Apr 13 09:56 p002
    400 -rw-r----- 1 amavis amavis 404993 Apr 13 09:56 p003
    400 -rw-r----- 1 amavis amavis 404342 Apr 13 09:56 p004

    So the directorys are there, but are vanishing
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    Hmm, did you restart amavis and the clamav daemon after you added the clamscan user? Please check with 'ps aux' if the clamav daemon is running under clamscan or under another user.

    These tmp directories are created by amavis to provide an email attachment for scanning as far as i know. So amavis will remove them when finished (or failed).
     
  6. Steffan

    Steffan Member

    ps aux | grep amavis

    amavis 464 0.2 2.1 888020 540980 ? Ssl Jan08 397:36 /usr/sbin/clamd -c /etc/clamd.d/amavisd.conf --foreground=yes

    strange the clamd is not restarting as a part op amavisd.
    I stoped amavisd killed the process, started amavisd and clamd came back up.
    Looks like the problem is also gone.

    Thanxs for the support.
     
    till likes this.

Share This Page