From clamav-devel-bounces@lists.clamav.net  Mon Mar 23 20:18:13 2009
Return-Path: <clamav-devel-bounces@lists.clamav.net>
X-Original-To: list@tad.clamav.net
Delivered-To: list@tad.clamav.net
X-Virus-Scanned: Debian amavisd-new at tad.clamav.net
Received: from tad.clamav.net ([127.0.0.1])
	by localhost (tad.clamav.net [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id ZSBJM3-g4MCU; Mon, 23 Mar 2009 20:18:12 +0100 (CET)
Received: from tad.clamav.net (localhost.localdomain [127.0.0.1])
	by tad.clamav.net (Postfix) with ESMTP id DDFEF16C124;
	Mon, 23 Mar 2009 20:18:08 +0100 (CET)
X-Original-To: clamav-devel@tad.clamav.net
Delivered-To: clamav-devel@tad.clamav.net
X-Virus-Scanned: Debian amavisd-new at tad.clamav.net
Received: from tad.clamav.net ([127.0.0.1])
	by localhost (tad.clamav.net [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id Yj9CFfcZluWa for <clamav-devel@tad.clamav.net>;
	Mon, 23 Mar 2009 20:18:05 +0100 (CET)
Received: from mailout.bkkb.no (mailout.bkkb.no [62.97.193.182])
	by tad.clamav.net (Postfix) with ESMTP id 67A0416C081
	for <clamav-devel@lists.clamav.net>;
	Mon, 23 Mar 2009 20:18:05 +0100 (CET)
Received: from mail.hjemme.no (mail.hjemme.no [62.97.193.11])
	by mailout.bkkb.no (Spam Firewall) with ESMTP id BE0C39AFA5D
	for <clamav-devel@lists.clamav.net>;
	Mon, 23 Mar 2009 20:18:04 +0100 (CET)
Received: from mail.hjemme.no (mail.hjemme.no [62.97.193.11]) by
	mailout.bkkb.no with ESMTP id OkVaHYK769AUDx5H for
	<clamav-devel@lists.clamav.net>;
	Mon, 23 Mar 2009 20:18:04 +0100 (CET)
Received: from dibbler (246.85-200-112.bkkb.no [85.200.112.246])
	by mail.hjemme.no (Postfix) with ESMTP id 80E69B0911C1
	for <clamav-devel@lists.clamav.net>;
	Mon, 23 Mar 2009 20:18:01 +0100 (CET)
Received: from granny ([192.168.1.2])
	by dibbler with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
	(Exim 4.69) (envelope-from <andy.ruddock@rainydayz.org>)
	id 1Llped-00061p-5L
	for clamav-devel@lists.clamav.net; Mon, 23 Mar 2009 20:17:47 +0100
Message-ID: <49C7E068.3060708@rainydayz.org>
Date: Mon, 23 Mar 2009 20:18:00 +0100
From: Andy Ruddock <andy.ruddock@rainydayz.org>
Organization: rainydayz.org
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US;
	rv:1.8.1.17) Gecko/20080829 SeaMonkey/1.1.12
	(Ubuntu-1.1.12+nobinonly-0ubuntu1)
MIME-Version: 1.0
To: ClamAV Development <clamav-devel@lists.clamav.net>
References: <49C7D4DE.3090104@rainydayz.org> <49C7D98D.9070503@ummm-beer.com>
In-Reply-To: <49C7D98D.9070503@ummm-beer.com>
X-Enigmail-Version: 0.95.7
OpenPGP: id=A622D452;
	url=http://www.rainydayz.org/pgpkeys/Andy_Ruddock-andy.ruddock.rainydayz.org-0xA622D452-pub.asc
Subject: Re: [Clamav-devel] clamdscan problems (misunderstanding?)
X-BeenThere: clamav-devel@lists.clamav.net
X-Mailman-Version: 2.1.9
Precedence: list
Reply-To: ClamAV Development <clamav-devel@lists.clamav.net>
List-Id: ClamAV Development <clamav-devel.lists.clamav.net>
List-Unsubscribe: <http://lists.clamav.net/cgi-bin/mailman/listinfo/clamav-devel>,
	<mailto:clamav-devel-request@lists.clamav.net?subject=unsubscribe>
List-Post: <mailto:clamav-devel@lists.clamav.net>
List-Help: <mailto:clamav-devel-request@lists.clamav.net?subject=help>
List-Subscribe: <http://lists.clamav.net/cgi-bin/mailman/listinfo/clamav-devel>,
	<mailto:clamav-devel-request@lists.clamav.net?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: clamav-devel-bounces@lists.clamav.net
Errors-To: clamav-devel-bounces@lists.clamav.net

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Rick Macdougall wrote:
> Andy Ruddock wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> I'm running Ubuntu 8.10 AMD64 and have clamav installed from the
>> repositories.
>> I've compiled a "hello world" program with permissions 0777
>> the command
>>    clamdscan hello
>> returns
>>    /hello: Access denied. ERROR
>>
>> I don't understand why this is so, where do the permissions required to
>> scan this file fail?
>>
>> BTW running "clamdscan - </hello" works fine, and even changing the
>> ownership on the file to clamav:clamav fails.
>>
> 
> Perhaps it is in a directory that the clamav user does not have access too ?
> 
> Try copying the file to /tmp and trying it there.
> 
> Regards,
> 
> Rick

Ok, that works. Now I'm really confused.
I made another directory with the same permissions as tmp, clamdscan
failed in that - then I remembered reading about a similar problem
somebody had with another application.
Turning AppArmor off allows clamdscan to scan as expected.

I'll need to investigate AppArmor now.

Thanks.

- --
Andy Ruddock
- ------------
andy.ruddock@rainydayz.org (GPG Key ID 0xA622D452)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAknH4GIACgkQfSkWkaYi1FKG3wCdH1HmUTi+SUHALlx6ZDndgpa7
1rQAoIYp60QWN20bzg56SphqqE9zMx3i
=7pQF
-----END PGP SIGNATURE-----
_______________________________________________
http://lurker.clamav.net/list/clamav-devel.html
Please submit your patches to our Bugzilla: http://bugs.clamav.net

