#543816 apt-get update tries to chdir $PWD

Package:
apt
Source:
apt
Description:
commandline package manager
Submitter:
Marc Glisse
Date:
2015-08-14 17:03:09 UTC
Severity:
minor
#543816#5
Date:
2009-08-27 06:46:20 UTC
From:
To:
When I run:

sudo apt-get update

from a directory where root is not allowed to go (700 permission on NFS),
it prints this error message and I get a non-zero exit code.

E: Unable to change to /home/glisse/mail/ - chdir (13: Permission denied)

It looks like the update works nonetheless, and I can always run the
command from elsewhere, so this is very minor, but I believe it is still
a bug.

(despite what you can see in the config files, this is an up-to-date
testing system)

#543816#10
Date:
2015-08-14 15:16:06 UTC
From:
To:
I just tried something similar:

I created an empty directory, changed into it and then removed it from
an other terminal. I then called "apt update" and it ran & finished
successsfully without any message about failing to change dir – which it
should have if it had tried, so I assume this was fixed and the meantime
and therefore I am closing this report.

Feel free to reopen if this can still be reproduced of course!


Best regards

David Kalnischkies

#543816#15
Date:
2015-08-14 17:01:19 UTC
From:
To:
reopen 543816
thanks

I can still reproduce it in testing (version 1.0.9.10, sorry, I can see a
slightly newer version in unstable, but installing it would upgrade too
many things so I did not test). As a user, I mounted a remote directory
using sshfs. Inside it, I have a subdirectory with mode 700. As root:

# cd /home/glisse/saclay/nancy-mail
-su: cd: /home/glisse/saclay/nancy-mail: Permission denied

As myself, I changed to that directory, called "sudo apt-get update", and
it ended with:

Fetched 1,463 kB in 50s (29.0 kB/s)
E: Unable to change to /home/glisse/saclay/nancy-mail/ - chdir (13:
Permission denied)