- 更新日: 2016年8月4日
- CentOS & Linux
Can’t get information about user clamav(clamdエラー)
CentOS サーバーにアンチウイルスソフトの ClamAV(Clam AntiVirus)をインストールしようとしたところ、表題のエラーに遭遇しました。ここのところ CentOS サーバーをいじる機会が多い。
アンチウイルスソフト Clam AntiVirus のインストールと設定 〜 CentOS6 | EasyRamble
— 環境 —
CentOS 6.5
Can’t get information about user clamav エラー
| 1 2 3 | $ sudo /sbin/service clamd start | 
ClamAV をインストール後に上記コマンドを実行して、clamd(ClamAV のデーモン)をスタートさせようとしたところでエラー発生。実際には Chef レシピを使って、プロビジョニング実行でサーバーを構成していました。
| 1 2 3 4 5 6 7 8 9 10 | Mixlib::ShellOut::ShellCommandFailed ------------------------------------ Expected process to exit with [0], but received '1' ---- Begin output of /sbin/service clamd start ---- STDOUT: Starting Clam AntiVirus Daemon: [FAILED] STDERR: ERROR: Can't get information about user clamav. ---- End output of /sbin/service clamd start ---- Ran /sbin/service clamd start returned 1 | 
エラーメッセージから、clamav ユーザーが取得できないためにエラーが起きてるっぽい。実際にサーバーにログインして確認したところ、clamav ユーザーが存在しませんでした。
いろいろ調べて、clamd の設定ファイルを修正。
| 1 2 3 | $ sudo vi /etc/clamd.conf | 
| 1 2 3 | User clamav | 
を以下に変更。
| 1 2 3 | User clam | 
これで Can’t get information about user clamav のエラーは発生しなくなった。
LibClamAV Error: cl_load(): No such file or directory: /var/clamav エラー
次に clamd を restart させようとして別のエラーに遭遇。
| 1 2 3 4 5 6 7 8 9 10 11 12 13 | $ sudo /sbin/service clamd restart Mixlib::ShellOut::ShellCommandFailed ------------------------------------ Expected process to exit with [0], but received '1' ---- Begin output of /sbin/service clamd restart ---- STDOUT: Stopping Clam AntiVirus Daemon: [FAILED] Starting Clam AntiVirus Daemon: [FAILED] STDERR: LibClamAV Error: cl_load(): No such file or directory: /var/clamav ERROR: Can't get file status ---- End output of /sbin/service clamd restart ---- Ran /sbin/service clamd restart returned 1 | 
こちらも実際には Chef プロビジョニング実行で発生。今度は /var/clamav がないと怒られている。
再び clamd.conf を修正します。
| 1 2 3 | $ sudo vi /etc/clamd.conf | 
| 1 2 3 | DatabaseDirectory /var/clamav | 
を以下に変更。
| 1 2 3 | DatabaseDirectory /var/lib/clamav | 
これで全てエラーが解決して、clamd を起動できました。
少々解決に手こずったのですが思い当たる原因としては… 先日 rpmforge リポジトリが使えなくなっているのを知りました。
RPMForge/RepoForge – This is a dead project. Not maintained. DO NOT USE.
AdditionalResources/Repositories – CentOS Wiki
それで、ClamAV のインストール先を rpmforge から epel に変更したのですが、その影響かな。あるいは ClamAV のバージョンアップで、設定ファイル(/etc/clamd.conf)が変更されていた等の影響かもしれません。以前作っていた Chef テンプレートの clamd.conf を使いましたので。
- – 参考リンク –
- Campworld – HOWTO Virtual Mail Hosting on CentOS 6.x – Postfix MySQL Dovecot PostfixAdmin Amavisd-new Spamassassin Clamav
- Update to 3.0.0.8 clamd issue – efa-project.org
- [CentOS] new clamav update miss ‘clamav’ user/group creation/update
- CentOS & Linux の関連記事
- Job for nginx.service failedのNginxエラー
- upstream sent too big header while reading response header from upstream(Nginx/Rails)
- STDERR: Exception in thread “main” java.lang.InternalErrorエラー
- Linuxサーバー容量を確認するコマンドdf,duをマスターする!
- rmでファイル削除後にdf -hで容量が減らない時の対処(Linux)
- Apacheをローカルネットワークのみに公開にする
- logwatchからのメールが来ないと思ったら…
- Linuxサーバの負荷や使用率を調査するコマンドと手順
- Bashの脆弱性もう一件CVE-2014-7169に対するパッチ適用
- Bash脆弱性に対してChefでbashをアップデートしてパッチ適用

 画像付き英語辞書 Imagict | 英単語をイメージで暗記
画像付き英語辞書 Imagict | 英単語をイメージで暗記









Leave Your Message!