我最近注意到一个令人沮丧的问题...处理电子邮件时,尝试病毒扫描附件时,Ubuntu Server(应用了所有更新)报告“权限被拒绝”。
Apr 2 14:05:20 svr amavis[6376]: (06376-01) (!)run_av (ClamAV-clamd) FAILED - unexpected , output="/var/lib/amavis/tmp/amavis-20150402T140519-06376-PZcyHfOt/parts: lstat() failed: Permission denied. ERROR\n"
Apr 2 14:05:20 svr amavis[6376]: (06376-01) (!)ClamAV-clamd av-scanner FAILED: CODE(0x30cf250) unexpected , output="/var/lib/amavis/tmp/amavis-20150402T140519-06376-PZcyHfOt/parts: lstat() failed: Permission denied. ERROR\n" at (eval 136) line 899.
Apr 2 14:05:20 svr amavis[6376]: (06376-01) (!)WARN: all primary virus scanners failed, considering backups
当我查看有问题的目录时,会看到以下内容:
$ ls -ld /var/lib/amavis/tmp
drwxrwx--- 4 amavis amavis 4096 Apr 2 14:16 /var/lib/amavis/tmp
$ ls -ld /var/lib/amavis/tmp/amavis-20150402T140519-06376-PZcyHfOt/
drwxr-x--- 3 amavis amavis 4096 Apr 2 14:05 /var/lib/amavis/tmp/amavis-20150402T140519-06376-PZcyHfOt/
$ ls -ld /var/lib/amavis/tmp/amavis-20150402T140519-06376-PZcyHfOt/parts
drwxr-x--- 2 amavis amavis 4096 Apr 2 14:16 /var/lib/amavis/tmp/amavis-20150402T140519-06376-PZcyHfOt/parts
我确保了这个蛤user用户是amavisd组的成员-但这没有解决任何问题。谁能具体告诉我,哪个组件需要什么权限-理想情况下该怎么做才能解决此问题?
澄清:我不是要对权限基础进行解释。我正在寻找适合此特定问题的解决方案-乍一看,至少看起来像amavis套件的一个组件(也许是蛤)使用了错误的umask值。当然,此错误可能是由于许多错误或配置故障引起的。我正在寻找一种最适合这种情况的解决方案……“香草” amavis / clamav安装程序无法访问它在扫描入站电子邮件时创建的临时文件夹的内容。
我知道这个类似(非Ubuntu)问题。Redhat / Centos的答案不能解决我在Ubuntu上遇到的问题。
在“ Ubuntu 14.04.2 LTS”上遇到此问题-没有挂起的更新。
chmod -R g+w /var/lib/amavis/tmp
amavis
没有和的写入权限/var/lib/amavis/tmp/amavis-20150402T140519-06376-PZcyHfOt/
/var/lib/amavis/tmp/amavis-20150402T140519-06376-PZcyHfOt/parts