Mailing List Archive

Error: access denied.
Hi everybody,

I have a problem with clamav daemon.
I'm using ClamAV module of drupal to scan uploaded files, I try to use
daemon mode to scan uploaded files. But unfortunately, It took me more than
three days to research and I still not make it work until now.
Everything I got here is only the error when I try to upload file. the
error is '/tmp/phpISPxXZ: Access denied. ERROR'.
I try to set 777 for /tmp folder, set 'clamav' users to 'root' group, but
still got this error.

Does anyone have experiences on it? Or Any ideas?
Thanks in advance.
--
*Nam Pham*
Phone: (+84) 932 830 330
Email: + nampham@mbm.vn
+ allstarsmen@gmail.com
Skype: nampham-mbm
Yahoo: allstars_men
_______________________________________________
Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
http://www.clamav.net/support/ml
Re: Error: access denied. [ In reply to ]
On Jul 16, 2012, at 3:01 AM, Nam PHAM wrote:
> Everything I got here is only the error when I try to upload file. the
> error is '/tmp/phpISPxXZ: Access denied. ERROR'.
> I try to set 777 for /tmp folder, set 'clamav' users to 'root' group, but
> still got this error.
>
> Does anyone have experiences on it? Or Any ideas?

First, fix permissions on /tmp by running "chmod 1777 /tmp".
(See "man sticky" and mtree, or whatever your OS uses to define stock permissions.)

Second, take a look at the ownership and permissions of /tmp/phpISPxXZ. Most likely,
it's being owned by an Apache httpd child or FastCGI process running as www, fcgi, etc.

clamd needs to be able to read those files; if the only purpose you're using ClamAV for is
this task, you could run clamd as the same user as your PHP script. Otherwise, if the
temp files are group-readable, consider making clamd part of that same group.

As a final resort, you could run clamd as root, but that's a bad idea unless you have no
other choices.

Regards,
--
-Chuck

_______________________________________________
Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
http://www.clamav.net/support/ml