cswiger at mac
Jul 16, 2012, 11:30 AM
Post #2 of 2
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
Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net