Minha configuração é a seguinte: meu usuário está logado através de uma autenticação de rede, sua casa é montada em NFS (tudo isso no Ubuntu 16.04).
Estou tentando configurar minha máquina para executar vários apt
comandos como update
ou install
:
update
falha comE: Unable to change to /home/$user/ - chdir (13: Permission denied)
. Eu consegui consertar isso rapidamente comesta resposta, basicamentecd /
install
me avisa que:dpkg: warning: failed to open configuration file '/home/zr258722/.dpkg.cfg' for reading: Permission denied
.
Como devo me livrar desses erros/avisos?
EDITAR
Os comandos exatos que estou executando e suas saídas são:
sudo apt-get update
que dá:
Ign:1 http://$intranet/depots/infogerance/ubuntu/drf-i2bm_pilote xenial-security InRelease
Ign:2 http://$intranet/depots/infogerance/ubuntu/drf-i2bm_pilote xenial-updates InRelease
Ign:3 http://$intranet/depots/infogerance/ubuntu/drf-i2bm_pilote xenial InRelease
Ign:4 http://$intranet/depots/infogerance/ubuntu/saclay_pilote xenial-security InRelease
Ign:5 http://$intranet/depots/infogerance/ubuntu/saclay_pilote xenial-updates InRelease
Ign:6 http://$intranet/depots/infogerance/ubuntu/saclay_pilote xenial InRelease
Ign:7 http://$intranet/depots/neurodebian/current data InRelease
Ign:8 http://$intranet/depots/neurodebian/current xenial InRelease
Ign:9 http://$intranet/depots/ubuntu/current xenial-security InRelease
Ign:10 http://$intranet/depots/ubuntu/current xenial-updates InRelease
Ign:11 http://dl.google.com/linux/chrome/deb stable InRelease
Ign:12 http://$intranet/depots/ubuntu/current xenial InRelease
Hit:13 http://$intranet/depots/infogerance/ubuntu/drf-i2bm_pilote xenial-security Release
Hit:14 http://$intranet/depots/infogerance/ubuntu/drf-i2bm_pilote xenial-updates Release
Hit:15 http://$intranet/depots/infogerance/ubuntu/drf-i2bm_pilote xenial Release
Hit:16 http://$intranet/depots/infogerance/ubuntu/saclay_pilote xenial-security Release
Hit:17 http://$intranet/depots/infogerance/ubuntu/saclay_pilote xenial-updates Release
Hit:18 http://$intranet/depots/infogerance/ubuntu/saclay_pilote xenial Release
Hit:19 http://$intranet/depots/neurodebian/current data Release
Hit:20 http://$intranet/depots/neurodebian/current xenial Release
Hit:21 http://$intranet/depots/ubuntu/current xenial-security Release
Hit:22 http://$intranet/depots/ubuntu/current xenial-updates Release
Hit:23 http://$intranet/depots/ubuntu/current xenial Release
Hit:24 http://ppa.launchpad.net/jonathonf/python-3.6/ubuntu xenial InRelease
Hit:25 http://dl.google.com/linux/chrome/deb stable Release
Hit:26 http://ppa.launchpad.net/webupd8team/atom/ubuntu xenial InRelease
Hit:28 http://repository.spotify.com stable InRelease
Reading package lists... Done
E: Unable to change to /home/$user/ - chdir (13: Permission denied)
- por exemplo
sudo apt-get python3.6
, que dá:
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
Responder1
Sua pasta pessoal deve ter pelo menos as seguintes permissões: u=rwx,g=r,o=r
, executechmod 0711 /home/$user
Responder2
Normalmente root não tem permissões para acessar montagens NFS, a menos que no_root_squash esteja definido para a exportação, o apt-get é executado no contexto root com sudo e não pode acessar o diretório inicial. Este é um aviso irritante, mas inofensivo, que pode ser ignorado.
Responder3
Às vezes, a instalação acontece de tal forma que parece que não é o usuário, mas o programa que está pedindo permissão. Você pode tentar alterar as permissões da pasta ofensiva para
chmod 777 offending_foldername
isso permitiria que todos os usuários lessem, escrevessem e executassem. Se isso resolver o problema, você provavelmente poderá se aprofundar e corrigir o problema por motivos de segurança de rede.