Debian – Troubles using apt-get install with home on NFS share


I am trying to install a bunch of packages using apt-get install on a VM running Debian 5.0.9 (Lenny). What makes this endeavor frustrating and difficult is the fact that my home directory on this machine is in fact a mounted NFS share. My local user is in the VM's sudoers file, and I can start installing all packages but eventually every installation fails because:

failed to open configuration file '/path/to/home/.dpkg.cfg' for
reading: Permission denied.

I assume that using sudo to run apt-get makes me act as the local root of the VM, which has no permissions whatsoever on the NFS share where my home directory is mounted. Thus, the installation cannot be finished.

I already tried to sudo -s my way around this issue but I am :

Sorry, user $user is not allowed to execute '/bin/bash' as root on

I was wondering if anyone could suggest any alternative way around this issue.


Best Answer

This is a bug that has been fixed in dpkg 1.10.21 (i.e. instead of dying with a fatal error a warning is emitted, since this configuration file is optional). If you can't fix the permission error, upgrading dpkg should mitigate the issue. Since you'll need to run dpkg to upgrade itself you might need to unmount the nfs home for that.