Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 $machine

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


share|improve this question
What version of nfs are you running? edit and paste /etc/fstab if you aren't sure. – Paul Jan 1 '12 at 14:55
everything is mounted using nfsvers=3 – luuke Jan 2 '12 at 11:24
Ok, with NFSv3 all the UIDs for the users need to match on each server and client. Do they? ie, if you do ls -l /path/to/home/.dpkg.cfg does it show the same ownership on the client and server? – Paul Jan 2 '12 at 13:32

1 Answer 1

up vote 2 down vote accepted

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.

share|improve this answer
Is there a way to silence that warning in some config file in /etc/ ? – arney Jun 20 '14 at 13:31
I am using Ubuntu 12.04 with my home folder mounted on NFS share, I suffer from the same issue when trying to install packages via sudo apt-get. Indeed dpkg returns only a warning now. However sometimes the installation program needs to access the home folder for other purposes than just reading the dpkg configuration file, and I get the error message: OSError: [Errno 13] Permission denied: '/NFSDRIVE/users/fred' – RockScience Dec 30 '14 at 7:57

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.