Search Engine: Elastic

Article ID: 123907, created on Dec 12, 2014, last review on Dec 12, 2014

  • Applies to:
  • H-Sphere 3.6.3


On one of servers, the freshclam cron job sends out the following error:

Cron <root@server10> /hsphere/shared/bin/freshclam --quiet

ERROR: Can't create temporary directory /hsphere/local/config/mail/clamav/dbs/clamav-77377d2f35eeacf02ba11babe3b1e838.tmp

When I tried to run the above HS script from command line, I'm getting this error:

[root@server10 ~]# /hsphere/shared/bin/freshclam
ERROR: Can't create temporary directory /hsphere/local/config/mail/clamav/dbs/clamav-b112b6c98eebc1d757eddee74d3cf335.tmp
Hint: The database directory must be writable for UID 503 or GID 503

I've looked at the folder permissions on the dbs and they seem to be correct:

[root@server10 ~]# cd /hsphere/local/config/mail/clamav/
[root@server10 clamav]# ls -al
total 68
drwxr-xr-x 4 root     root    4096 Jul  6 00:43 .
drwxr-xr-x 8 root     root    4096 Dec  8 03:30 ..
-r--r--r-- 1 vpopmail vchkpw 14313 Jan 21  2014 clamd.conf
-rw-r--r-- 1 root     root   17161 Jan 21  2014 clamd.conf.sample
drwxr-xr-x 2 clamav   clamav  4096 Jan 21  2014 dbs
-r--r--r-- 1 vpopmail vchkpw  3171 Jan 21  2014 freshclam.conf
-rw-r--r-- 1 root     root    8627 Jan 21  2014 freshclam.conf.sample
drwxr-xr-x 4 vpopmail vchkpw  4096 Jul  6 00:43 supervise

Clarification part

To make sure that you have issue with "Disk quota" perform the following steps:

  1. Run the following command on the affected server:

    strace /hsphere/shared/bin/freshclam

  2. Make sure that output contains the following strings:

    mkdir("/hsphere/local/config/mail/clamav/dbs/clamav-02b7119b059444a99f2a0f8bb26702b4.tmp", 0755) = -1 EDQUOT (Disk quota exceeded)
    write(2, "ERROR: Can\'t create temporary di"..., 122ERROR: Can't create temporary directory /hsphere/local/config/mail/clamav/dbs/clamav-02b7119b059444a99f2a0f8bb26702b4.tmp


Disk quota exceeded for specific user.


Correct Disk quota for specified in error user (in example case UID 503) .

Hint: The database directory must be writable for UID 503 or GID 503

6b908665c0d1eca5bdd0141a32fd712a 6311ae17c1ee52b36e68aaf4ad066387 f213b9fa8759d57bee5d547445806fe7 2e39a5e5b1423cc126cf735bac076008

Email subscription for changes to this article
Save as PDF