[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Buster install using debootstrap.



On Fri, Jun 05, 2020 at 08:30:16AM +0200, Sven Hartge wrote:
> Marc Shapiro <marcnshap@gmail.com> wrote:
> 
> > I also don't understand why it says that it could not create temporary 
> > files in /tmp.  I am running this as root and /tmp is owned by root.  
> > What am I missing?
> 
> /tmp (and /var/tmp/) should have the following permissions and rights:
> 
>  root:root 1777/drwxrwxrwt
> 
> apt runs its I/O processes as a different user "_apt" and if /tmp does
> not have the sticky bit set, then it cannot create any files there,
> causing the error.
> 
Another thing to check (which may or may not apply in this particular
instance) is any special TMP/TEMP/TMPDIR/TEMPDIR environment variable
handling in the host environment.  On my systems I use pam_tmpdir, which
creates a user-specific temporary directory (/tmp/user/${UID}) and then
sets the TMP/TEMP/TMPDIR/TEMPDIR environment variables to that path.

When I chroot into an environment, I must take care to either ensure
those variables are unset inside the chroot or to create the necessary
directory structure with matching ownership and permissions.

Another solution is to bind mount /tmp from the host into the chroot.

Regards,

-Roberto

-- 
Roberto C. Sánchez


Reply to: