Unix & Linux Asked by Haydon on December 17, 2021
I have found that using
sudo apt install ./<package_name_here>.deb
fails with
E: Failed to fetch file:<path_to_package>/<package_name_here>.deb File not found - <path_to_package>/<package_name_here>.deb (13: Permission denied)
when a containing directory of ./<package_name_here>.deb
has permissions set to 700.
However, there is no issue when using
sudo dpkg -i ./<package_name_here>.deb
Is this a bug of apt
or am I doing something wrong?
Do you realize that apt
and dpkg
are not the same?
The /etc/apt/sources.list
file is used to locate the desired packages in apt-get (as in apt).
Answered by oroverdino on December 17, 2021
Since version 1.1, apt
uses an unprivileged user (_apt
) to download packages. This includes local package retrieval, unless (in theory) the package isn’t world-readable; there have been bugs with this in the past (see #805069), this could be a variant...
You can disable this by setting APT::Sandbox::User
to root
:
apt -o APT::Sandbox::User=root ...
Answered by Stephen Kitt on December 17, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP