Clamdscan Root Lstat Failed Permission Denied Error
Contents |
Post #1 of 12 (17751 views) Permalink lstat() failed: Permission denied. ERROR Hi all! I'm clamdscan permission denied. error getting the following error message while try to run clamdscan: $
Clamdscan Vs Clamscan
clamdscan eicar.txt eicar.txt: lstat() failed: Permission denied. ERROR I've enable debug mode and got: $fds_poll_recv: timeout
Error: Could Not Lookup : Servname Not Supported For Ai_socktype
after 600 seconds $Received POLLIN|POLLHUP on fd 5 $Got new connection, FD 10 $Received POLLIN|POLLHUP on fd 6 $fds_poll_recv: timeout after 5 seconds $Received POLLIN|POLLHUP on fd
Clamav
10 $got command CONTSCAN /home/superuser/eicar.txt (35, 7), argument: /home/superuser/eicar.txt $mode -> MODE_WAITREPLY $Breaking command loop, mode is no longer MODE_COMMAND $Consumed entire command $Number of file descriptors polled: 1 fds $fds_poll_recv: timeout after 600 seconds $THRMGR: queue crossed low threshold -> signaling WARNING: lstat() failed on: /home/superuser/eicar.txt $Finished scanthread $Scanthread: connection shut down (FD 10) $THRMGR: queue crossed low threshold -> signaling This is a RHEL 5.4. Any ideas what's going on here ? Thanks! _______________________________________________ Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net http://www.clamav.net/support/ml dan.mcdonald at austinenergy Dec21,2009,8:12AM Post #2 of 12 (17525 views) Permalink Re: lstat() failed: Permission denied. ERROR [In reply to] On Mon, 2009-12-21 at 13:02 -0300, Lima Union wrote: > Hi all! I'm getting the following error message while try to run clamdscan: > > $ clamdscan eicar.txt > eicar.txt: lstat() failed: Permission denied. ERROR clamdscan runs with the permissions of the daemon user. You probably want to do something like: $ cat eicar.txt | clamdscan -- Daniel J McDonald, CCIE # 2495, CISSP # 78281, CNX www.austinenergy.com _______________________________________________ Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net http://www.clamav.net/support/ml limaunion at gmail Dec21,2009,9:14AM Post #3 of 12 (17515 views) Permalink Re: lstat() failed: Permission denied. ERROR [In reply to] On Mon, Dec 21, 2009 at 1:12 PM, Daniel J McDonald
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 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 http://www.gossamer-threads.com/lists/clamav/users/45998 verified: sudo ps -eal | grep clam 1 S 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 http://stackoverflow.com/questions/25437940/configure-clamdscan-to-scan-all-files-on-a-system-on-unbuntu-12-04 not a good option. From my understanding clamd uses the user 'clamav' and 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 you
Get Kubuntu Get Xubuntu Get Lubuntu Get UbuntuStudio Get Mythbuntu Get Edubuntu Get Ubuntu-GNOME Get UbuntuKylin Ubuntu Code of Conduct Ubuntu Wiki Community Wiki Other Support Launchpad Answers Ubuntu IRC Support AskUbuntu Official Documentation User Documentation https://ubuntuforums.org/showthread.php?t=1670502 Social Media Facebook Twitter Useful Links Distrowatch Bugs: Ubuntu PPAs: Ubuntu Web Upd8: Ubuntu OMG! Ubuntu Ubuntu Insights Planet Ubuntu Activity Page Please read before SSO login Advanced Search Forum The Ubuntu Forum Community Ubuntu Official http://qiita.com/todaemon/items/d83425058c0e52b258c7 Flavours Support General Help [ubuntu] clamdscan refuses to scan anything Having an Issue With Posting ? Do you want to help us debug the posting issues ? < is the place to report it, thanks ! permission denied Results 1 to 7 of 7 Thread: clamdscan refuses to scan anything Thread Tools Show Printable Version Subscribe to this Thread… Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode January 19th, 2011 #1 flamadiddle View Profile View Forum Posts Private Message Visit Homepage First Cup of Ubuntu Join Date Mar 2010 Location Pensacola, FL Beans 11 DistroUbuntu 10.04 Lucid Lynx clamdscan refuses to scan anything Not sure what's going on clamdscan root lstat here. I've installed clamav, clamav-freshclam and clamav-daemon to run automated scans on my machine running Ubuntu Desktop 10.04 LTS x64. Unfortunately, clamdscan refuses to scan anything. Code: root@uhs:/raid/Share/Public/# clamdscan -v /raid/Share/Public/ /raid/Share/Public: lstat() 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 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, so obviously this won't work. What's going on here? Can I use clamdscan? Thank you for any help. Adv Reply January 19th, 2011 #2 flamadiddle View Profile View Forum Posts Private Message Visit Homepage First Cup of Ubuntu Join Date Mar 2010 Location Pensacola, FL Beans 11 DistroUbuntu 10.04 Lucid Lynx Re: clamdscan refuses to scan anything Further information regarding this issue: This is the output of `sudo -u clamav stat /raid/Share/Public/` Code: root@uhs:/raid/Share/
攻撃的または迷惑な内容を含んでいます 不適切な内容を含んでいます 送信11ストック0コメントストックストック済み解除 この記事は最終更新日から1年以上が経過しています。前回の続きです。 今回はウイルス検知処理をデーモン化するのと、ウイルス定義ファイルの自動更新するところをまとめますね。 1. ウイルススキャン処理のデーモン化 デーモン化にはclamdというパッケージが必要です。yumでインストールします。 # yum install clamd Loaded plugins: fastestmirror, security Loading mirror speeds from cached hostfile * epel: ftp.kddilabs.jp Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package clamd.x86_64 0:0.98.1-1.el6 will be installed --> Finished Dependency Resolution Dependencies Resolved ============================================================================================================== Package Arch Version Repository Size ============================================================================================================== Installing: clamd x86_64 0.98.1-1.el6 epel 150 k Transaction Summary ============================================================================================================== Install 1 Package(s) Total download size: 150 k Installed size: 563 k Is this ok [y/N]: y Downloading Packages: clamd-0.98.1-1.el6.x86_64.rpm | 150 kB 00:00 Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction Installing : clamd-0.98.1-1.el6.x86_64 1/1 Verifying : clamd-0.98.1-1.el6.x86_64 1/1 Installed: clamd.x86_64 0:0.98.1-1.el6 Complete! # サクッとインストできました。 clamd