On Tue, Jul 02, 2019 at 08:58:12AM -0000, Stuart Henderson wrote:
> On 2019-06-30, Jonathan Thornburg <jth...@astro.indiana.edu> wrote:
> > I have 6.5/i386 installed on a PC Engines alix board (hostname 'sodium'),
> > acting as a home firewall and router.  I'd like to install some packages
> > the firewall it to make system adminstration easier.  So... I downloaded
> > the appropriate 6./i386 packages from a nearby OpenBSD mirror, ssh-ed them
> > to /tmp on the firewall, and then (logged into the firewall as root) tried
> > to  pkg_add  them.  Alas, pkg_add failed with an error message about being
> > unable to write into a temp directory:
> >
> >   sodium# pkg_add -vv tcsh-6.20.00p1-static.tgz
> >   Fatal error: Can't write session into tmp directory
> >    at /usr/libdata/perl5/OpenBSD/PackageRepository.pm line 1025.
> >   sodium#
> >
> > I've checked that the firewall has adequate free memory & swap space,
> > that all the obviously-relevant filesystems are mounted read-write and
> > have free inodes and disk space, and that 'touch foo' can create a new
> > file in each of /tmp, /var/tmp, and /usr/tmp.
> >
> > Is there something obvious I'm overlooked here?  A Fine Man Page I should
> > be rereading before I start hacking debug prints into the pkg_add (perl)
> > source code?


> Chances are you're temporarily out of space in /tmp during the run, but don't
> see it because the files are cleaned up on exit. I think you would be better
> off merging /tmp and /usr/tmp into a single slightly larger fs (or just use
> a partition on wd0 for tmp - alixes don't really have enough RAM to throw
> ~half of it into a ramdisk). 

Nope, I don't think that's the issue.

I would look more closely at your /var/tmp
It's highly likely it has wrong permissions.

Checking that you can create a file in /var/tmp as root is definitely
not enough.

pkg_add is privilege separated, it will run ftp(1)  as _pkgfetch

Reply via email to