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

Bug#867997: jessie->stretch, all apt clients break with /var/lib/dpkg/status realpath error



Quoting Niels Thykier (niels@thykier.net):

FTR; I don't think that "apt-get check" is supposed to work as non-root.

  - If it fails, please attempt to figure out where the permission
    fails (e.g. [dir-test])

# ls -ld / /var /var/lib /var/lib/dpkg /var/lib/dpkg/status
drwxr-xr-x 21 root root    1024 Jul 10 11:21 /
drwxr-xr-x 13 root root    4096 May  7  2013 /var
drwxr-xr-x 74 root root    4096 Jul  7 16:01 /var/lib
drwxr-xr-x  8 root root    4096 Jul 11 08:48 /var/lib/dpkg
-rw-r--r--  1 root root 1961225 Jul 11 08:48 /var/lib/dpkg/status

As you can see, none of these are writable by _apt; however, these are
the same permissions I see on the other (working)

Indeed, and _apt does not need write access to the status file.

Does it work if you disable the sandbox user, e.g. by using:
 apt-get -o APT::Sandbox::User=root update

No, same error:

# apt-get -o APT::Sandbox::User=root update
Get:1 http://security.debian.org stretch/updates InRelease [62.9 kB]
Get:2 http://ftp.us.debian.org/debian stretch-updates InRelease [88.5 kB]
Ign:3 http://ftp.debian.org/debian stretch InRelease
Hit:4 http://ftp.debian.org/debian stretch Release
Fetched 151 kB in 1s (81.1 kB/s)
Reading package lists... Error!
E: flAbsPath on /var/lib/dpkg/status failed - realpath (22: Invalid argument)
E: Could not open file  - open (2: No such file or directory)
E: Problem opening
E: The package lists or status file could not be parsed or opened.


--
Alan Schwartz
The Michael Reese Endowed Professor of Medical Education
Associate Head, UIC Department of Medical Education
Research Professor, UIC Department of Pediatrics
alansz@uic.edu  |  http://ulan.mede.uic.edu/alansz  |  PGP: 0x062556CF


Reply to: