Celeb Glow
updates | March 26, 2026

apt install warns that .dpkg.cfg for reading: Permission denied

My setup is the following: my user is logged in via a network authentication, its home is NFS mounted (all of this on ubuntu 16.04).

I am trying to set up my machine so running multiple apt commands like update or install:

  • update fails with E: Unable to change to /home/$user/ - chdir (13: Permission denied). I managed to quick-fix it with this answer, basically cd /

  • install warns me that: dpkg: warning: failed to open configuration file '/home/zr258722/.dpkg.cfg' for reading: Permission denied.

How should I get rid of those errors/warnings?


EDIT

The exact commands I am running and their outputs are:

  • sudo apt-get update which gives:
Ign:1 xenial-security InRelease
Ign:2 xenial-updates InRelease
Ign:3 xenial InRelease
Ign:4 xenial-security InRelease
Ign:5 xenial-updates InRelease
Ign:6 xenial InRelease
Ign:7 data InRelease
Ign:8 xenial InRelease
Ign:9 xenial-security InRelease
Ign:10 xenial-updates InRelease
Ign:11 stable InRelease
Ign:12 xenial InRelease
Hit:13 xenial-security Release
Hit:14 xenial-updates Release
Hit:15 xenial Release
Hit:16 xenial-security Release
Hit:17 xenial-updates Release
Hit:18 xenial Release
Hit:19 data Release
Hit:20 xenial Release
Hit:21 xenial-security Release
Hit:22 xenial-updates Release
Hit:23 xenial Release
Hit:24 xenial InRelease
Hit:25 stable Release
Hit:26 xenial InRelease
Hit:28 stable InRelease
Reading package lists... Done
E: Unable to change to /home/$user/ - chdir (13: Permission denied)
  • for example sudo apt-get python3.6 which gives:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required: libpython3-dev libpython3.5-dev libpython3.6 libpython3.6-dev python3.5-dev
Use 'sudo apt autoremove' to remove them.
Suggested packages: python3.6-venv python3.6-doc
The following NEW packages will be installed: python3.6
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/246 kB of archives.
After this operation, 336 kB of additional disk space will be used.
dpkg: warning: failed to open configuration file '/home/$user/.dpkg.cfg' for reading: Permission denied
Selecting previously unselected package python3.6.
(Reading database ... 375863 files and directories currently installed.)
Preparing to unpack .../python3.6_3.6.8-1~16.04.york1_amd64.deb ...
Unpacking python3.6 (3.6.8-1~16.04.york1) ...
Processing triggers for bamfdaemon (0.5.3~bzr0+16.04.20180209-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for gnome-menus (3.13.3-6ubuntu3.1) ...
Processing triggers for desktop-file-utils (0.22-1ubuntu5.2) ...
Processing triggers for mime-support (3.59ubuntu1) ...
Processing triggers for man-db (2.7.5-1) ...
dpkg: warning: failed to open configuration file '/home/$user/.dpkg.cfg' for reading: Permission denied
Setting up python3.6 (3.6.8-1~16.04.york1) ...
dpkg: warning: failed to open configuration file '/home/$user/.dpkg.cfg' for reading: Permission denied
dpkg: warning: failed to open configuration file '/home/$user/.dpkg.cfg' for reading: Permission denied
0

3 Answers

Your home folder should have at least the following permissions: u=rwx,g=r,o=r, run chmod 0711 /home/$user

1

Normally root doesn't have permissions to access NFS mounts, unless no_root_squash is set for the export, apt-get runs in root context with sudo and can't access the home directory. This is an annoying but harmless warning, which can be ignored.

Sometimes the installation happens such that it looks as if not the user but the program is asking for the permission.You could try to change the permissions of the offending folder to

chmod 777 offending_foldername

this would give all users to read,write and execute. If this solves the problem you could probably look deeper and fix the issue for network security reasons.

3

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy