I have installed the last version of VestaCP and I notice something wrong in ClamAV. Just installed, created a very first domain and got ClamAV process using 100% of CPU.
The problem is in /var/run/clamav directory. It is created with root as owner and group. When I change the group and owner of directory to clam user and restart ClamAV process, the clamAv starts with normal CPU usage.
Is this as bug?
Seems so... added bug to test: https://bugs.vestacp.com/issues/123
@adrianofnatal can you tell us more about your OS and version?
I have the same problem, CentOS 7.
I have the same problem on CentOS 7.
But I don't know how to "change the group and owner of directory to clam user". Could you please give some detailed instructions?
Thank you.
However, I checked the directory /var/run, there is no a folder named "clamav", neither "clamd".
Why my VestaCP did not create that folder?
I described and solved a similar issue here: https://github.com/serghey-rodin/vesta/issues/645
Today, on a new VPS with CentOS 7 64-bit, I installed VestaCP freshly. However, after installation finished, I noticed that this issue still exists!
The primary problem is: there is no directory named "clamav" in /var/run . I still have to create this directory MANUALLY ! Then, of course, I also need to change the owner and group of this folder to solve the high CPU usage by clamd.
Why you still have not solve this problem in the installing script of VestaCP ?
blare's solution worked for me:
mkdir /var/run/clamav/
褋hown clam:mail /var/run/clamav/
Today I made a new test to verify this issue:
On a fresh installed CentOS 7 minimal, I installed VestaCP. When I check the /var/run folder, I noticed that this time, VestaCP had created the folder "clamav" there.
But, the owner of this "clamav" folder is:
I have to manually modify the owner to "clam:mail", then the CPU usage decreased from 99% to 1% .
The worse is: if I reboot the server, then that folder "clamav" will be DELETED AUTOMATICALLY .
I don't know what/who had deleted that folder. It just disappeared after server reboot.
Then I have to manually created that folder and assign the proper owner to it AGAIN.
This is very bad. This means: everytime you reboot the server, you need to re-create that folder again and re-assign the owner again.
Hope VestaCP team will solve this problem in next release.
Thank you.
Hello,
Not real fix, but simple workaround. Add these two lines into /etc/rc.local
mkdir /var/run/clamav
chown clam:mail /var/run/clamav
This will do the job for you on each reboot.
Best regards
Fix will be in 0.9.8-17
Most helpful comment
blare's solution worked for me:
mkdir /var/run/clamav/
褋hown clam:mail /var/run/clamav/