Clamdscan Access Denied. Error
Contents |
Search HCL Search Reviews Search ISOs Go to Page... LinuxQuestions.org > Forums > Linux Forums > Linux - Software [SOLVED] Permissions clamdscan lstat() failed: permission denied. error for clamdscan User Name Remember Me? Password Linux - Software This forum
Clamdscan Vs Clamscan
is for Software issues. Having a problem installing a new program? Want to know which application is error: could not lookup : servname not supported for ai_socktype best for the job? Post your question in this forum. Notices Welcome to LinuxQuestions.org, a friendly and active Linux Community. You are currently viewing LQ as a guest. By clamav joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today! Note that registered members see fewer ads, and ContentLink is completely disabled once you log in. Are you new to LinuxQuestions.org? Visit the following links: Site Howto | Site FAQ | Sitemap | Register Now If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here. Having a problem logging in? Please visit this page to clear all LQ-related cookies. Introduction to Linux - A Hands on Guide This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter. For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own. Click Here to receive th
Post #1 of 4 (5491 views) Permalink clamdscan [file] shows access denied When running clamdscan against a file in my home directory I get: [chris [at] cpolloc ~]$ clamdscan testmsg.txt /home/chris/testmsg.txt: Access denied. ERROR ----------- SCAN SUMMARY ----------- Infected files: 0 Time: 0.000 sec (0 m 0 s) Version and link to the output of running clamconf is below. [root [at] cpolloc ~]# clamd -V ClamAV 0.93-exp/7251/Mon May http://www.linuxquestions.org/questions/linux-software-2/permissions-for-clamdscan-906389/ 26 17:45:09 2008 http://www.thelinkup.com/shared/hqq1umr4baw5 If I remember correctly I had no problems running clamdscan as 'user' in previous versions. To be sure though I ran the same command as 'root' [root [at] cpolloc chris]# clamdscan testmsg.txt /home/chris/testmsg.txt: Access denied. ERROR ----------- SCAN SUMMARY ----------- Infected files: 0 Time: 0.001 sec (0 m 0 s) http://www.gossamer-threads.com/lists/clamav/users/38686 Clamscan works however: [chris [at] cpolloc ~]$ clamscan testmsg.txt testmsg.txt: Email.Spam.Gen3183.Sanesecurity.08051617 FOUND ----------- SCAN SUMMARY ----------- Known viruses: 356795 Engine version: 0.93 Scanned directories: 0 Scanned files: 1 Infected files: 1 Data scanned: 0.00 MB Time: 5.228 sec (0 m 5 s) Any ideas/suggestions? -- Chris KeyID 0xE372A7DA98E6705C cswiger at mac May26,2008,8:40PM Post #2 of 4 (5412 views) Permalink Re: clamdscan [file] shows access denied [In reply to] On May 26, 2008, at 7:56 PM, Chris wrote: > Any ideas/suggestions? Sure: make sure whatever uid the clamd daemon is running as has permissions to access the file if you want to use clamdscan. If it doesn't, use clamscan instead for that case, or copy the file to /tmp or someplace like that with world-readable permissions. -- -Chuck _______________________________________________ Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net http://lurker.clamav.net/list/clamav-users.html dennispe at inetnw May26,2008,10:52PM Post #3 of 4 (5432 views) Permalink Re: clamdscan [file] shows access denied [In reply to] Chris wrote: > When running clamds
communities company blog Stack Exchange Inbox Reputation and Badges sign up log in tour help Tour Start here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About http://askubuntu.com/questions/22307/why-cant-clamdscan-scan-anything Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Ask Ubuntu Questions Tags Users Badges Unanswered Ask Question _ Ask Ubuntu is a http://superuser.com/questions/671116/why-clamav-cant-scan-some-files question and answer site for Ubuntu users and developers. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are denied. error voted up and rise to the top Why can't clamdscan scan anything? up vote 5 down vote favorite 1 Not sure what's going on here. I've installed clamav, clamav-freshclam and clamav-daemon to run automated scans (using cron) on my machine running Ubuntu Desktop 10.04 LTS x64. Unfortunately, clamdscan refuses to scan anything. This is the output I receive every time I try: root@uhs:/raid/Share/Public/# clamdscan -v /raid/Share/Public/ /raid/Share/Public: lstat() clamdscan access denied. failed: Permission denied. ERROR ----------- SCAN SUMMARY ----------- Infected files: 0 Total errors: 1 Time: 0.004 sec (0 m 0 s) root@uhs:/raid/Share/Public/# /raid/Share/Public has 777 permissions, and the clamav-daemon user clamav has been added to both the admin and root groups. I get the same error no matter what files or directories I try to scan. I even ran dpkg-reconfigure clamav-base and made the daemon user root to see if that would help (which it didn't). And I have of course run service clamav-daemon restart in between all of these changes. I'm aware of the cat file_name | clamdscan - option, but I need to be able to scan whole directories recursively, so obviously this won't work. What am I doing wrong? Can I use clamdscan? Thank you for any help. Update Output of sudo -u clamav stat /raid/Share/Public/: root@uhs:/raid/Share/Public# sudo -u clamav stat /raid/Share/Public/ File: `/raid/Share/Public/' Size: 6 Blocks: 0 IO Block: 4096 directory Device: 900h/2304d Inode: 54526208 Links: 2 Access: (0777/drwxrwxrwx) Uid: ( 1000/awensley) Gid: ( 120/ admin) Access: 2011-01-19 01:00:00.304365306 -0600 Modify: 2011-01-18 22:47:06.793592673 -0600 Change: 2011-01-19 00:42:52.023813550 -0600 root@uhs:/raid/Share/Public# Update 2 I have this exact same problem on 5 separate Ubuntu 10.04 machines; 3 of them ser
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Super User Questions Tags Users Badges Unanswered Ask Question _ Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top Why ClamAV can't scan some files? up vote 2 down vote favorite Whenever I try to execute a ClamAV scan on a file in many of my bin directories, it fails with a Can't open file or directory ERROR message. I know it's possible to get ClamdScan to scan the bin directory but I can't figure out how. Any suggestions? $ clamdscan /bin/true /bin/true: Can't open file or directory ERROR ----------- SCAN SUMMARY ----------- Infected files: 0 Total errors: 1 Time: 0.000 sec (0 m 0 s) I can't find any differences between the AppArmor configuration files on the machine where it works and on the machine where it doesn't. I did get it to scan with a workaround by adding: /bin/** r, to: /etc/apparmor.d/local/usr.sbin.clamd But this line isn't present on the other machine's local clamd AppArmor permissions file so I'm still confused and such a shot-gun solution of just saying ClamAV can access everything in /bin and below mainly because if this is the solution then I have to add /sbin /usr/bin and /usr/sbin to AppArmor as well, and that just seems counter-intuitive. clamav share|improve this question edited Oct 31 '14 at 11:46 Hennes 50.8k775120 asked Nov 7 '13 at 22:57 TimeHorse 1417 Please provide the permission information on the folder. &ndash