How to get apt to make files in /var/cache/apt/archives always world-readable?
APT is affected by the umask
of root which is inherited from the global setting from /etc/profile
. You've likely a line in it with umask 077
. To make the files world-readable by default, you'll have to change it to:
umask 022
To change default the permissions of existing files, run:
sudo chmod 644 /var/cache/apt/archives/*
To copy archives from one machine to another, you can use netcat
. On the source machine (ip = 10.0.0.2
) which has .deb
files to be distributed you need to install netcat-traditional
and run:
cd /var/cache/apt/archives
tar c * | nc.traditional -l -p 1234
Replace *
by the files you want to copy.
On the target machine, run:
nc 10.0.0.2 1234 | sudo tar xv -C /var/cache/apt/archives