[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#295687: base-config: late_command run with TMPDIR not world-writable



Package: base-config
Version: 2.53.5
Severity: normal

I'm building a custom Debian distribution based on the Debian installer.
I have preseeded a number of debconf settings amongst which
base-config/late_command is set to install some additional packages.  It is
set to this value:

mount /cdrom; dpkg --set-selections < /cdrom/get-selections.txt; apt-get -y dselect-upgrade; eject /cdrom

One of the packages installed is clamav-daemon.  When its postinst script runs
it tries to start the daemon (standard debhelper code), which fails like this:

Starting ClamAV daemon: LibClamAV Error: cli_cvdload(): Can't create temporary directory /tmp/base-config.1141/clamav-c72....
[...]
invoke-rc.d: initscript clamav-daemon action "start" failed.

Although clamav fails to tell why it can't create that directory, I'm pretty
sure it is because /tmp/base-config.1141 has mode 0755, not 1777 like /tmp
normally has.  ClamAV runs as its own user, so it can't access the TMPDIR,
where it tries to create its temporary directory.

In any case, changing the value of base-config/late_command to

TMPDIR=/tmp; export TMPDIR; mount /cdrom; dpkg --set-selections < /cdrom/get-selections.txt; apt-get -y dselect-upgrade; eject /cdrom

makes the problem go away.

Please make sure that TMPDIR has the correct permissions at all times.



Reply to: