Presumably steps to reproduce would be:

a. Install an old clamav version
  $ sudo apt-get update
  $ sudo apt-get install clamav-base=1.0.5+dfsg-1.1ubuntu3

b. Remove the clamav user and/or group
  $ grep clamav /etc/passwd
  clamav:x:111:116::/var/lib/clamav:/bin/false
  $ sudo deluser clamav
  info: Removing crontab ...
  info: Removing user `clamav' ...

c. Upgrade clamav
  $ sudo apt-get dist-upgrade
  Preparing to unpack .../clamav-base_1.4.3+dfsg-0ubuntu0.24.04.1_all.deb ...
  Unpacking clamav-base (1.4.3+dfsg-0ubuntu0.24.04.1) over 
(1.0.5+dfsg-1.1ubuntu3) ...
  Setting up clamav-base (1.4.3+dfsg-0ubuntu0.24.04.1) ...
  chown: invalid user: ‘clamav:clamav’
  dpkg: error processing package clamav-base (--configure):
   installed clamav-base package post-installation script subprocess returned 
error exit status 1
  Errors were encountered while processing:
   clamav-base
  E: Sub-process /usr/bin/dpkg returned an error code (1)


** Description changed:

  package clamav-base 1.4.3+dfsg-0ubuntu0.24.04.1 failed to
  install/upgrade: installed clamav-base package post-installation script
  subprocess returned error exit status 1
  
  Error message is:
  chown: invalid user: ‘clamav:clamav’
+ 
+ Workaround is to manually create the clamav user and group.
+ Another workaround would be to backup any customized clamav config and then 
`sudo apt-get purge clamav*` and reinstall from scratch.
  
  ProblemType: Package
  DistroRelease: Ubuntu 24.04
  Package: clamav-base 1.4.3+dfsg-0ubuntu0.24.04.1
  ProcVersionSignature: Ubuntu 6.11.0-29.29~24.04.1-generic 6.11.11
  Uname: Linux 6.11.0-29-generic x86_64
  NonfreeKernelModules: nvidia_modeset nvidia
  ApportVersion: 2.28.1-0ubuntu3.7
  Architecture: amd64
  CasperMD5CheckResult: pass
  Date: Wed Jul  2 18:03:28 2025
  ErrorMessage: installed clamav-base package post-installation script 
subprocess returned error exit status 1
  InstallationDate: Installed on 2024-11-23 (221 days ago)
  InstallationMedia: Ubuntu 24.04.1 LTS "Noble Numbat" - Release amd64 
(20240827.1)
  PackageArchitecture: all
  ProcCmdline: BOOT_IMAGE=/boot/vmlinuz-6.11.0-29-generic 
root=UUID=8ebabfdc-452c-4287-ba52-6a9f01f131e3 ro quiet splash vt.handoff=7
  Python3Details: /usr/bin/python3.12, Python 3.12.3, python3-minimal, 
3.12.3-0ubuntu2
  PythonDetails: N/A
  RelatedPackageVersions:
   dpkg 1.22.6ubuntu6.1
   apt  2.8.3
  SourcePackage: clamav
  Title: package clamav-base 1.4.3+dfsg-0ubuntu0.24.04.1 failed to 
install/upgrade: installed clamav-base package post-installation script 
subprocess returned error exit status 1
  UpgradeStatus: No upgrade log present (probably fresh install)

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2115832

Title:
  package clamav-base 1.4.3+dfsg-0ubuntu0.24.04.1 failed to
  install/upgrade: chown: invalid user: ‘clamav:clamav’

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/clamav/+bug/2115832/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to