Clamdscan Error
Contents |
Assigned to Milestone clamav (Ubuntu) Edit Fix Released Undecided Jamie clamdscan lstat() failed: permission denied. error Strandboge Edit You need to log in to change this clamdscan permission denied. error bug's status. Affecting: clamav (Ubuntu) Filed here by: Imre PĂ©ntek When: 2009-10-13 Confirmed: 2009-10-24
Clamdscan Vs Clamscan
Assigned: 2009-10-20 Started work: 2009-10-24 Completed: 2009-10-26 Target Distribution Baltix BOSS Juju Charms Collection Elbuntu Guadalinex Guadalinex Edu Kiwi Linux nUbuntu PLD Linux
Clamdscan Access Denied Error
Tilix tuXlab Ubuntu Ubuntu Linaro Evaluation Build Ubuntu RTM Package (Find…) Project (Find…) Status Importance Fix Released Undecided Assigned to Me Jamie Strandboge (jdstrand) Comment on this change (optional) Email me about changes to this bug report Also affects project (?) Also affects distribution/package Nominate for series Bug error: could not lookup : servname not supported for ai_socktype Description Binary package hint: clamav Hello, I don't know what's the problem really is, let's see a session: imi@most:~$ cd Asztal/ imi@most:~/Asztal$ clamdscan words.txt /home/imi/Asztal/words.txt: Access denied. ERROR ----------- SCAN SUMMARY ----------- Infected files: 0 Time: 0.008 sec (0 m 0 s) imi@most:~/Asztal$ ls -ladh words.txt . drwxr-xr-x 16 imi imi 4,0K 2009-10-13 12:19 . -rw-r--r-- 1 imi imi 2,5M 2009-09-21 15:40 words.txt imi@most:~/Asztal$ cp words.txt .. imi@most:~/Asztal$ cd .. imi@most:~$ clamdscan words.txt /home/imi/words.txt: Access denied. ERROR ----------- SCAN SUMMARY ----------- Infected files: 0 Time: 0.008 sec (0 m 0 s) imi@most:~$ ls -ladh words.txt . drwxr-xr-x 65 imi imi 4,0K 2009-10-13 12:42 . -rw-r--r-- 1 imi imi 2,5M 2009-10-13 12:42 words.txt imi@most:~$ rm words.txt imi@most:~$ cd /tmp imi@most:/tmp$ cp /home/imi/Asztal/words.txt . imi@most:/tmp$ clamdscan words.txt /tmp/words.txt: OK ----------- SCAN SUMMARY ----------- Infected files: 0 Time: 0.350 sec (0 m 0
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
Clamav
Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Configure clamdscan to scan all files on a system on Unbuntu 12.04 up vote 0 down vote favorite I did the following to install clamscan: sudo aptitude install clamav sudo aptitude install clamav-daemon and verified: sudo ps -eal | grep clam 1 S https://bugs.launchpad.net/bugs/450250 116 4788 1 2 80 0 - 4004 pause ? 00:00:13 freshclam 1 S 116 5930 1 0 80 0 - 69984 poll_s ? 00:00:00 clamd however when I try to scan all the files on the the system by running #sudo clamdscan / I keep getting the following error message: lstat() failed: Permission denied. ERROR However if I run sudo clamscan / it works, but this process is much longer and not a good option. From my understanding clamd uses the user 'clamav' and http://stackoverflow.com/questions/25437940/configure-clamdscan-to-scan-all-files-on-a-system-on-unbuntu-12-04 is listed in the /etc/clamav/clamd.conf file. I've added the user clamav to the following groups : root, adm, sudo but it still doesn't work. I've also tried disabling Apparmor as I read that could be the issue but no success. ubuntu ubuntu-12.04 share|improve this question asked Aug 22 '14 at 0:28 Maria 63 add a comment| 1 Answer 1 active oldest votes up vote 0 down vote sudo clamdscan /path/to/some_file.txt will pass the request along to the clamd daemon. That daemun runs under a different user, which may not have access to /path/to/some_file.txt However, the user invoking the command, may very well have access to that file. In order to pass your permissions along to the daemon, use the --fdpass flag: --fdpass Pass the file descriptor permissions to clamd. This is useful if clamd is running as a different user as it is faster than streaming the file to clamd. Only available if connected to clamd via local(unix) socket. In your case sudo clamdscan --fdpass / should do the trick. share|improve this answer answered Apr 1 '15 at 13:18 berkes 13.7k1267144 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Facebook Sign up using Email and Password Post as a guest Name Email Post as a guest Name Email discard By posting your answer, you agree to the privacy policy and terms of service. Not the answer you're looking for? Browse other questions tagged ubuntu ubuntu-12.04 or ask your o
sorted by: [ date ] [ thread ] [ subject ] [ author ] I'm having some issues verifying a clamav install under FC 22. I am doing some http://lists.clamav.net/pipermail/clamav-users/2015-November/002047.html testing using clamdscan and have been running into some kind of permission error as far as I can tell. For now, I have set selinux to permissive to eliminate http://superuser.com/questions/671116/why-clamav-cant-scan-some-files that as an issue. I have an eicar.com file that I have scanned with clamscan and it verifies that one file has been scanned and that one virus has permission denied. been found. Next, I want to submit a scan of eicar.com using clamdscan. [root at zzz tmp]# ls -l eicar.com -rw-rw-r--. 1 clamscan clamscan 68 Sep 4 2006 eicar.com [root at zzz tmp]# [root at ears tmp]# clamdscan -c /etc/clamd.d/scan.conf /tmp/eicar.com /tmp/eicar.com: lstat() failed: No such file or directory. ERROR ----------- SCAN SUMMARY ----------- Infected files: 0 Total errors: permission denied. error 1 Time: 0.001 sec (0 m 0 s) [root at ears tmp]# ls -l eicar.com -rw-rw-r--. 1 clamscan clamscan 68 Sep 4 2006 eicar.com [root at ears tmp]# clamdscan -c /etc/clamd.d/scan.conf /tmp/eicar.com /tmp/eicar.com: lstat() failed: No such file or directory. ERROR ----------- SCAN SUMMARY ----------- Infected files: 0 Total errors: 1 Time: 0.001 sec (0 m 0 s) Note that the file is not found. If I scan the directory instead: [root at ears tmp]# clamdscan -c /etc/clamd.d/scan.conf /tmp /tmp: OK ----------- SCAN SUMMARY ----------- Infected files: 0 Time: 0.000 sec (0 m 0 s) You have new mail in /var/spool/mail/dan [root at ears tmp]# No infected file is found and no errors. clamd is running as clamscan. Ready for any suggestions about what is happening here. I've been working on this for a few days. Thank you. Previous message: [clamav-users] how to narrow down the signature database? Next message: [clamav-users] clamdscan troubleshooting Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] More information about the clamav-users mailing list
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. –Ramhound Nov 7 '13 at 23:31 @Ramhound it's -rwxr-xr-x 1 root root 27184 Nov 8 07:49 /bin/true* for the given executabl