I want the files in/var/cache/apt/archives
to always have read permissions for everyone. That is, whenever apt
downloads a new file into this directory, it should make it world-readable. This is not the case currently, an example entry from ls -l /var/cache/apt/archives
looks like this:
-rw------- 1 root root 26928 2009-05-03 20:34 /var/cache/apt/archives/sl_3.03-16_amd64.deb
What should I do to have the files always world-readable?
(Aside: I want this because I have a few Ubuntu laptops on a LAN and using scp
or rsync
I occasionally copy /var/cache/apt/archives
from one laptop to the other. I don't use apt-cacher or squid-deb-proxy etc because at any point any subset of the laptops might be connected to the network; I have no central server.)
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 withumask 077
. To make the files world-readable by default, you'll have to change it to:To change default the permissions of existing files, run:
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 installnetcat-traditional
and run:Replace
*
by the files you want to copy.On the target machine, run: