Installs fine, but when you try to start it via the init.d script it outputs permissions errors in the syslog and then dies. Doing 'chown -R amavis /var/amavis/' fixes the problem and amavis starts fine. Not sure if thats the correct thing to do, but it worked. Advise would be most welcome. Thanks in advance. Reproducible: Always Steps to Reproduce: 1. 2. 3. [Syslog error] Sep 26 21:02:12 ml-gentoo amavis[27465]: starting. /usr/sbin/amavisd at ml-gentoo.hidden.domain amavisd-new-2.3.3 (20050822), Unicode aware Sep 26 21:02:12 ml-gentoo amavis[27465]: Perl version 5.008006 Sep 26 21:02:13 ml-gentoo amavis[27466]: Module Amavis::Conf 2.043 Sep 26 21:02:13 ml-gentoo amavis[27466]: Module Archive::Tar 1.23 Sep 26 21:02:13 ml-gentoo amavis[27466]: Module Archive::Zip 1.14 Sep 26 21:02:13 ml-gentoo amavis[27466]: Module BerkeleyDB 0.26 Sep 26 21:02:13 ml-gentoo amavis[27466]: Module Compress::Zlib 1.35 Sep 26 21:02:13 ml-gentoo amavis[27466]: Module Convert::TNEF 0.17 Sep 26 21:02:13 ml-gentoo amavis[27466]: Module Convert::UUlib 1.051 Sep 26 21:02:13 ml-gentoo amavis[27466]: Module DBD::mysql 2.9003 Sep 26 21:02:13 ml-gentoo amavis[27466]: Module DBI 1.46 Sep 26 21:02:13 ml-gentoo amavis[27466]: Module DB_File 1.811 Sep 26 21:02:13 ml-gentoo amavis[27466]: Module MIME::Entity 5.415 Sep 26 21:02:13 ml-gentoo amavis[27466]: Module MIME::Parser 5.415 Sep 26 21:02:13 ml-gentoo amavis[27466]: Module MIME::Tools 5.415 Sep 26 21:02:13 ml-gentoo amavis[27466]: Module Mail::Header 1.65 Sep 26 21:02:13 ml-gentoo amavis[27466]: Module Mail::Internet 1.65 Sep 26 21:02:13 ml-gentoo amavis[27466]: Module Mail::SpamAssassin 3.000004 Sep 26 21:02:13 ml-gentoo amavis[27466]: Module Net::Cmd 2.26 Sep 26 21:02:13 ml-gentoo amavis[27466]: Module Net::DNS 0.49 Sep 26 21:02:13 ml-gentoo amavis[27466]: Module Net::SMTP 2.29 Sep 26 21:02:13 ml-gentoo amavis[27466]: Module Net::Server 0.87 Sep 26 21:02:13 ml-gentoo amavis[27466]: Module Time::HiRes 1.66 Sep 26 21:02:13 ml-gentoo amavis[27466]: Module Unix::Syslog 0.100 Sep 26 21:02:13 ml-gentoo amavis[27466]: Amavis::DB code loaded Sep 26 21:02:13 ml-gentoo amavis[27466]: Amavis::Cache code loaded Sep 26 21:02:13 ml-gentoo amavis[27466]: SQL base code NOT loaded Sep 26 21:02:13 ml-gentoo amavis[27466]: SQL::Log code NOT loaded Sep 26 21:02:13 ml-gentoo amavis[27466]: SQL::Quarantine NOT loaded Sep 26 21:02:13 ml-gentoo amavis[27466]: Lookup::SQL code NOT loaded Sep 26 21:02:13 ml-gentoo amavis[27466]: Lookup::LDAP code NOT loaded Sep 26 21:02:13 ml-gentoo amavis[27466]: AM.PDP prot code loaded Sep 26 21:02:13 ml-gentoo amavis[27466]: SMTP-in prot code loaded Sep 26 21:02:13 ml-gentoo amavis[27466]: ANTI-VIRUS code loaded Sep 26 21:02:13 ml-gentoo amavis[27466]: ANTI-SPAM code loaded Sep 26 21:02:13 ml-gentoo amavis[27466]: Unpackers code loaded Sep 26 21:02:13 ml-gentoo amavis[27466]: Found $file at /usr/bin/file Sep 26 21:02:13 ml-gentoo amavis[27466]: No $dspam, not using it Sep 26 21:02:13 ml-gentoo amavis[27466]: Internal decoder for .mail Sep 26 21:02:13 ml-gentoo amavis[27466]: Internal decoder for .asc Sep 26 21:02:13 ml-gentoo amavis[27466]: Internal decoder for .uue Sep 26 21:02:13 ml-gentoo amavis[27466]: Internal decoder for .hqx Sep 26 21:02:13 ml-gentoo amavis[27466]: Internal decoder for .ync Sep 26 21:02:13 ml-gentoo amavis[27466]: Found decoder for .F at /usr/bin/unfreeze Sep 26 21:02:13 ml-gentoo amavis[27466]: Found decoder for .Z at /usr/bin/uncompress Sep 26 21:02:13 ml-gentoo amavis[27466]: Internal decoder for .gz Sep 26 21:02:13 ml-gentoo amavis[27466]: Found decoder for .bz2 at /bin/bzip2 -d Sep 26 21:02:13 ml-gentoo amavis[27466]: No decoder for .lzo tried: lzop -d Sep 26 21:02:13 ml-gentoo amavis[27466]: No decoder for .rpm tried: rpm2cpio.pl, rpm2cpio Sep 26 21:02:13 ml-gentoo amavis[27466]: No decoder for .cpio tried: pax Sep 26 21:02:13 ml-gentoo amavis[27466]: Found decoder for .cpio at /bin/cpio Sep 26 21:02:13 ml-gentoo amavis[27466]: No decoder for .tar tried: pax Sep 26 21:02:13 ml-gentoo amavis[27466]: Found decoder for .tar at /bin/cpio Sep 26 21:02:13 ml-gentoo amavis[27466]: Found decoder for .deb at /usr/bin/ar Sep 26 21:02:13 ml-gentoo amavis[27466]: Internal decoder for .zip Sep 26 21:02:13 ml-gentoo amavis[27466]: Found decoder for .rar at /usr/bin/unrar Sep 26 21:02:13 ml-gentoo amavis[27466]: Found decoder for .arj at /usr/bin/unarj Sep 26 21:02:13 ml-gentoo amavis[27466]: Found decoder for .arc at /usr/bin/arc Sep 26 21:02:13 ml-gentoo amavis[27466]: Found decoder for .zoo at /usr/bin/zoo Sep 26 21:02:13 ml-gentoo amavis[27466]: Found decoder for .lha at /usr/bin/lha Sep 26 21:02:13 ml-gentoo amavis[27466]: No decoder for .doc tried: ripole Sep 26 21:02:13 ml-gentoo amavis[27466]: Found decoder for .cab at /usr/bin/cabextract Sep 26 21:02:13 ml-gentoo amavis[27466]: No decoder for .tnef Sep 26 21:02:13 ml-gentoo amavis[27466]: Internal decoder for .tnef Sep 26 21:02:13 ml-gentoo amavis[27466]: Found decoder for .exe at /usr/bin/unrar; /usr/bin/lha; /usr/bin/unarj Sep 26 21:02:13 ml-gentoo amavis[27466]: Using internal av scanner code for (primary) ClamAV-clamd Sep 26 21:02:13 ml-gentoo amavis[27466]: Found secondary av scanner ClamAV-clamscan at /usr/bin/clamscan Sep 26 21:02:13 ml-gentoo amavis[27466]: TROUBLE in pre_loop_hook: db_home directory is not writable: /var/amavis/db at /usr/sbin/amavisd line 6445. [OR] Sep 26 21:01:12 ml-gentoo amavis[27337]: TROUBLE in pre_loop_hook: TEMPBASE directory is not writable: /var/amavis/tmp at /usr/sbin/amavisd line 6435. [emerge info] Portage 2.0.51.22-r2 (default-linux/x86/2005.0/2.4, gcc-3.3.6, glibc-2.3.5-r1, 2.4.28-gentoo-r9 i686) ================================================================= System uname: 2.4.28-gentoo-r9 i686 Intel(R) Xeon(TM) CPU 2.80GHz Gentoo Base System version 1.6.13 dev-lang/python: 2.3.5-r2 sys-apps/sandbox: 1.2.12 sys-devel/autoconf: 2.13, 2.59-r6 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6 sys-devel/binutils: 2.15.92.0.2-r10 sys-devel/libtool: 1.5.18-r1 virtual/os-headers: 2.4.22-r1 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-O3 -march=pentium4 -funroll-loops -fprefetch-loop-arrays -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/bind /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O3 -march=pentium4 -funroll-loops -fprefetch-loop-arrays -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig distlocks sandbox sfperms strict" GENTOO_MIRRORS="ftp://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 X apache2 apm arts avi berkdb bitmap-fonts crypt cups curl eds emboss encode esd fam foomaticdb fortran gd gdbm gif gpm gstreamer gtk gtk2 imap imlib ipv6 jpeg libg++ libwww mad maildir mikmod mmx motif mp3 mpeg mysql ncurses nls ogg oggvorbis opengl oss pam pdflib perl php png python quicktime readline samba sasl sdl slang snmp spell squid sse sse2 ssl tcltk tcpd tiff truetype truetype-fonts type1-fonts vorbis xml2 xmms xv zlib userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY
This is really strange, because the ebuild sets ownership of /var/amavis to amavis:amavis (ebuild line 167). Can you tell what was the directory ownership before you changed it?
drwxr-xr-x 6 root root 376 Sep 27 02:56 amavis Yeah, thats strange. I see the lines in the ebuild you refer too. Not sure if it makes a difference, but this was the first time installing amavisd-new on this server, so was creating new dirs and not replacing old ones.
FYI: The ownership on my x86 system was postfix:amavis, the mode 0750 (BTW: I've never installed postfix...), now it belongs to amavis:amavis so the amavisd can start w/o errors.
Hm, maybe the postfix: ownership got there with some previous versions of amavisd-new? What was the first amavisd-new version you installed? Also, check for amavis (now removed from Portage), it may have used the same directory, I'm not sure.
I just installed 2.3.3-r1 on a fresh gentoo install, which has never ran amavisd-new before. I see the exact same problems as reported here. The problem is not with the ownership of /var/amavis/ but with subdirecties in it (tmp, db, etcetera).
Could you try newly released 2.4.0 ? I changed the code a bit regarding installed files permissions/ownership in that ebuild.
I would also add to this that amavisd init script reports [OK] even though it doesn't start (rasnfrasn)
This problem with amavisd-new only shows its self on a new install of amavis and not on an upgrade. So ive been unable to test the new package you have created to see if this problem persists. Has anyone seen this problem with 2.4.0 on a new install?
Fixed in cvs (for version 2.3.3-r2)