Problem sharing apt cache through NFS

Andre Costa <[email protected]> Mon, 19 Jul 2004 14:18:10 -0300
Newsgroups gmane.linux.conectiva.apt-rpm
Organization TecGraf
Message-ID <[email protected]>
Hi,

this is more a basic UNIX question, but I am pretty sure you guys will
be able to help me out with it: we would like to share
/var/cache/apt/archives among a group of machines, with one of them
acting as the "master repository" from which the rest would mount this
directory, so that we would only need to download packages once.

Export permissions on the "master" server are (rw,no_root_squash,sync),
and the filesystem is indeed being mounted rw by root. However, 'apt-get
upgrade' complains with:

E: Could not get lock /var/cache/apt/archives/lock - open (13 Permission denied)
E: Unable to lock the download directory

Weird thing is that root on the client machines _can_ write and execute
files on the mounted partition... in fact, creating the very same lock
file by hand succeeds.

stracing the apt-get call yields this:

open("/var/cache/apt/archives/lock", O_RDWR|O_CREAT|O_TRUNC, 0640) = 17
fcntl64(17, F_SETFD, FD_CLOEXEC)        = 0
fcntl64(17, F_SETLK, {type=F_WRLCK, whence=SEEK_SET, start=0, len=0}) = -1 EACCES (Permission denied)

My feeling is that the problem is obvious, but I must confess I got
stuck. If anyone could shed some light on this, I'd be most grateful =)

TIA

Andre

PS: Is there any better way of sharing apt-get downloads?

-- 
Andre Oliveira da Costa
([email protected])