Change php upload tmp file permission. Clamav deamon cant access

I'm currently developing a new website where a lot of files will be uploaded and downloaded.

When a file is uploaded to the server clamav will start a virus scan on the tmp file before it will be moved to the http server. Everything works great except when i use clamscan and it seems like clamav needs to upload the hole virus database before the scan starts every time and this stress my cpu to 50% for maybe 10 - 20 seconds.

This seem to be a big problem because if two users upload files at the same time to my website it will probably be very slow.

So I installed clamav deamon because it runs in the background and already have the virus database loaded so a lot of time and cpu power can be saved. But to the problem...

When i use clamdscan (clamav deamon) it cant access any of the tmp files that's uploaded with the php script. It only works when i use clamscan. This is probably because clamdscan is running in the background and uses some very strict user permissions.

But how can i solve this? Can i change the tmp php upload file permission from 0600 to 0644? Is that safe? Or should i change permission for clamav deamon?

I don't really know how to do this and if someone know and what to shear I'm very thankful.

链接地址: http://www.djcxy.com/p/72804.html

上一篇: 针对python 2.5.1的项目目录中的资源

下一篇: 更改php上传tmp文件的权限。 Clamav deamon无法访问