[buildd-tools-devel] Bug#876703: schroot: Can't run schroot as normal user

APT Gatuno MX apt at gatuno.mx
Sun Sep 24 23:15:49 UTC 2017


Package: schroot
Version: 1.6.10-3+b1
Severity: normal

Dear Maintainer,

Can't run schroot as normal user in the schroot stretch version. I've 
done the following:

I've installed a new, clean Debian stretch installation, without any 
graphical interface. Next, created a normal user, and then add that user 
to sbuild group using sbuild-adduser. Next, I created a schroot using 
"sbuild-createchroot 
--make-sbuild-tarball=/var/lib/sbuild/stretch-amd64.tar.gz stretch 
`mktemp -d` http://lug.mtu.edu/debian"

The schroot is listed using the command schroot -l, and root can use it 
and modify it. But the normal user can't use it. Not even if the normal 
user logouts and login.

When executed as normal user, from the "/" directory, the following 
output come:

W: Failed to change to directory ‘/’: Permission denied
I: The directory does not exist inside the chroot.  Use the --directory 
option to run the command in a different directory.
E: Failed to change to directory ‘/home/gatuno’: Permission denied
I: The directory does not exist inside the chroot.  Use the --directory 
option to run the command in a different directory.

Executing with the "verbose" option, the following output comes:

I: Executing ‘00check setup-start ok’
I: 00check: STAGE=setup-start
I: 00check: STATUS=ok
I: 00check: AUTH_GID=1000
I: 00check: AUTH_HOME=/home/gatuno
I: 00check: AUTH_RGID=1000
I: 00check: AUTH_RGROUP=gatuno
I: 00check: AUTH_RUID=1000
I: 00check: AUTH_RUSER=gatuno
I: 00check: AUTH_SHELL=/bin/bash
I: 00check: AUTH_UID=1000
I: 00check: AUTH_USER=gatuno
I: 00check: CHROOT_ALIAS=stretch-amd64-sbuild
I: 00check: CHROOT_DESCRIPTION=Debian stretch/amd64 autobuilder (session 
chroot)
I: 00check: CHROOT_FILE=/var/lib/sbuild/stretch-amd64.tar.gz
I: 00check: CHROOT_FILE_REPACK=false
I: 00check: CHROOT_FILE_UNPACK_DIR=/var/lib/schroot/unpack
I: 00check: 
CHROOT_MOUNT_LOCATION=/var/run/schroot/mount/stretch-amd64-sbuild-a31860db-f33a-4bb7-8a10-4b2dd1c62219
I: 00check: CHROOT_NAME=stretch-amd64-sbuild
I: 00check: 
CHROOT_PATH=/var/run/schroot/mount/stretch-amd64-sbuild-a31860db-f33a-4bb7-8a10-4b2dd1c62219
I: 00check: CHROOT_PROFILE=sbuild
I: 00check: CHROOT_PROFILE_DIR=/etc/schroot/sbuild
I: 00check: CHROOT_SESSION_CLONE=false
I: 00check: CHROOT_SESSION_CREATE=false
I: 00check: CHROOT_SESSION_PURGE=true
I: 00check: CHROOT_SESSION_SOURCE=false
I: 00check: CHROOT_TYPE=file
I: 00check: DATA_DIR=/usr/share/schroot
I: 00check: LIBEXEC_DIR=/usr/lib/x86_64-linux-gnu/schroot
I: 00check: MOUNT_DIR=/var/run/schroot/mount
I: 00check: 
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
I: 00check: PID=6325
I: 00check: PLATFORM=linux
I: 00check: PWD=/
I: 00check: 
SESSION_ID=stretch-amd64-sbuild-a31860db-f33a-4bb7-8a10-4b2dd1c62219
I: 00check: SETUP_CONFIG=/etc/schroot/sbuild/config
I: 00check: SETUP_COPYFILES=/etc/schroot/sbuild/copyfiles
I: 00check: SETUP_DATA_DIR=/usr/share/schroot/setup
I: 00check: SETUP_FSTAB=/etc/schroot/sbuild/fstab
I: 00check: SETUP_NSSDATABASES=/etc/schroot/sbuild/nssdatabases
I: 00check: SYSCONF_DIR=/etc/schroot
I: 00check: VERBOSE=verbose
I: Executing ‘05btrfs setup-start ok’
I: Executing ‘05file setup-start ok’
I: 05file: File unpack directory: 
/var/lib/schroot/unpack/stretch-amd64-sbuild-a31860db-f33a-4bb7-8a10-4b2dd1c62219
I: 05file: Created file unpack directory: 
/var/lib/schroot/unpack/stretch-amd64-sbuild-a31860db-f33a-4bb7-8a10-4b2dd1c62219
I: 05file: Changed CWD to 
/var/lib/schroot/unpack/stretch-amd64-sbuild-a31860db-f33a-4bb7-8a10-4b2dd1c62219
I: 05file: ./
-- A lot of files follow
I: 05file: ./run/lock/
I: Executing ‘05lvm setup-start ok’
I: Executing ‘05union setup-start ok’
I: Executing ‘10mount setup-start ok’
I: 10mount: Mounting 
/var/lib/schroot/unpack/stretch-amd64-sbuild-a31860db-f33a-4bb7-8a10-4b2dd1c62219 
on 
/var/run/schroot/mount/stretch-amd64-sbuild-a31860db-f33a-4bb7-8a10-4b2dd1c62219
I: 10mount: -v --bind  
/var/lib/schroot/unpack/stretch-amd64-sbuild-a31860db-f33a-4bb7-8a10-4b2dd1c62219 
/var/run/schroot/mount/stretch-amd64-sbuild-a31860db-f33a-4bb7-8a10-4b2dd1c62219
I: 10mount: mount: 
/var/lib/schroot/unpack/stretch-amd64-sbuild-a31860db-f33a-4bb7-8a10-4b2dd1c62219 
bound on 
/run/schroot/mount/stretch-amd64-sbuild-a31860db-f33a-4bb7-8a10-4b2dd1c62219.
I: 10mount: mount: /proc bound on 
/run/schroot/mount/stretch-amd64-sbuild-a31860db-f33a-4bb7-8a10-4b2dd1c62219/proc.
I: 10mount: mount: 
/run/schroot/mount/stretch-amd64-sbuild-a31860db-f33a-4bb7-8a10-4b2dd1c62219/proc 
propagation flags changed.
I: 10mount: mount: /sys bound on 
/run/schroot/mount/stretch-amd64-sbuild-a31860db-f33a-4bb7-8a10-4b2dd1c62219/sys.
I: 10mount: mount: 
/run/schroot/mount/stretch-amd64-sbuild-a31860db-f33a-4bb7-8a10-4b2dd1c62219/sys 
propagation flags changed.
I: 10mount: mount: /dev/pts bound on 
/run/schroot/mount/stretch-amd64-sbuild-a31860db-f33a-4bb7-8a10-4b2dd1c62219/dev/pts.
I: 10mount: mount: 
/run/schroot/mount/stretch-amd64-sbuild-a31860db-f33a-4bb7-8a10-4b2dd1c62219/dev/pts 
propagation flags changed.
I: 10mount: mount: tmpfs mounted on 
/run/schroot/mount/stretch-amd64-sbuild-a31860db-f33a-4bb7-8a10-4b2dd1c62219/dev/shm.
I: 10mount: mount: /var/lib/sbuild/build bound on 
/run/schroot/mount/stretch-amd64-sbuild-a31860db-f33a-4bb7-8a10-4b2dd1c62219/build.
I: 10mount: mount: 
/run/schroot/mount/stretch-amd64-sbuild-a31860db-f33a-4bb7-8a10-4b2dd1c62219/build 
propagation flags changed.
I: Executing ‘15binfmt setup-start ok’
I: 15binfmt: Missing update-binfmts; not enabling binfmt support
I: Executing ‘15killprocs setup-start ok’
I: Executing ‘20copyfiles setup-start ok’
I: Executing ‘20nssdatabases setup-start ok’
I: 20nssdatabases: Copying passwd database to 
/var/run/schroot/mount/stretch-amd64-sbuild-a31860db-f33a-4bb7-8a10-4b2dd1c62219/etc/passwd
I: 20nssdatabases: Copying shadow database to 
/var/run/schroot/mount/stretch-amd64-sbuild-a31860db-f33a-4bb7-8a10-4b2dd1c62219/etc/shadow
I: 20nssdatabases: Copying group database to 
/var/run/schroot/mount/stretch-amd64-sbuild-a31860db-f33a-4bb7-8a10-4b2dd1c62219/etc/group
I: 20nssdatabases: Copying gshadow database to 
/var/run/schroot/mount/stretch-amd64-sbuild-a31860db-f33a-4bb7-8a10-4b2dd1c62219/etc/gshadow
I: Executing ‘50chrootname setup-start ok’
I: 50chrootname: Setting chroot name to stretch-amd64-sbuild
I: Executing ‘70services setup-start ok’
I: 70services: Starting services
I: Executing ‘99check setup-start ok’
W: Failed to change to directory ‘/’: Permission denied
I: The directory does not exist inside the chroot.  Use the --directory 
option to run the command in a different directory.
E: Failed to change to directory ‘/home/gatuno’: Permission denied
I: The directory does not exist inside the chroot.  Use the --directory 
option to run the command in a different directory.
I: Executing ‘99check setup-stop ok’
I: 99check: STAGE=setup-stop
I: 99check: STATUS=ok
I: 99check: AUTH_GID=1000
I: 99check: AUTH_HOME=/home/gatuno
I: 99check: AUTH_RGID=1000
I: 99check: AUTH_RGROUP=gatuno
I: 99check: AUTH_RUID=1000
I: 99check: AUTH_RUSER=gatuno
I: 99check: AUTH_SHELL=/bin/bash
I: 99check: AUTH_UID=1000
I: 99check: AUTH_USER=gatuno
I: 99check: CHROOT_ALIAS=stretch-amd64-sbuild
I: 99check: CHROOT_DESCRIPTION=Debian stretch/amd64 autobuilder (session 
chroot)
I: 99check: CHROOT_FILE=/var/lib/sbuild/stretch-amd64.tar.gz
I: 99check: CHROOT_FILE_REPACK=false
I: 99check: CHROOT_FILE_UNPACK_DIR=/var/lib/schroot/unpack
I: 99check: 
CHROOT_MOUNT_LOCATION=/var/run/schroot/mount/stretch-amd64-sbuild-a31860db-f33a-4bb7-8a10-4b2dd1c62219
I: 99check: CHROOT_NAME=stretch-amd64-sbuild
I: 99check: 
CHROOT_PATH=/var/run/schroot/mount/stretch-amd64-sbuild-a31860db-f33a-4bb7-8a10-4b2dd1c62219
I: 99check: CHROOT_PROFILE=sbuild
I: 99check: CHROOT_PROFILE_DIR=/etc/schroot/sbuild
I: 99check: CHROOT_SESSION_CLONE=false
I: 99check: CHROOT_SESSION_CREATE=false
I: 99check: CHROOT_SESSION_PURGE=true
I: 99check: CHROOT_SESSION_SOURCE=false
I: 99check: CHROOT_TYPE=file
I: 99check: DATA_DIR=/usr/share/schroot
I: 99check: LIBEXEC_DIR=/usr/lib/x86_64-linux-gnu/schroot
I: 99check: MOUNT_DIR=/var/run/schroot/mount
I: 99check: 
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
I: 99check: PID=6325
I: 99check: PLATFORM=linux
I: 99check: PWD=/
I: 99check: 
SESSION_ID=stretch-amd64-sbuild-a31860db-f33a-4bb7-8a10-4b2dd1c62219
I: 99check: SETUP_CONFIG=/etc/schroot/sbuild/config
I: 99check: SETUP_COPYFILES=/etc/schroot/sbuild/copyfiles
I: 99check: SETUP_DATA_DIR=/usr/share/schroot/setup
I: 99check: SETUP_FSTAB=/etc/schroot/sbuild/fstab
I: 99check: SETUP_NSSDATABASES=/etc/schroot/sbuild/nssdatabases
I: 99check: SYSCONF_DIR=/etc/schroot
I: 99check: VERBOSE=verbose
I: Executing ‘70services setup-stop ok’
I: 70services: Stopping services
I: Executing ‘50chrootname setup-stop ok’
I: Executing ‘20nssdatabases setup-stop ok’
I: Executing ‘20copyfiles setup-stop ok’
I: Executing ‘15killprocs setup-stop ok’
I: 15killprocs: Killing processes run inside 
/var/run/schroot/mount/stretch-amd64-sbuild-a31860db-f33a-4bb7-8a10-4b2dd1c62219
I: Executing ‘15binfmt setup-stop ok’
I: 15binfmt: Missing update-binfmts; not enabling binfmt support
I: Executing ‘10mount setup-stop ok’
I: 10mount: Unmounting 
/run/schroot/mount/stretch-amd64-sbuild-a31860db-f33a-4bb7-8a10-4b2dd1c62219/build
I: 10mount: Unmounting 
/run/schroot/mount/stretch-amd64-sbuild-a31860db-f33a-4bb7-8a10-4b2dd1c62219/dev/shm
I: 10mount: Unmounting 
/run/schroot/mount/stretch-amd64-sbuild-a31860db-f33a-4bb7-8a10-4b2dd1c62219/dev/pts
I: 10mount: Unmounting 
/run/schroot/mount/stretch-amd64-sbuild-a31860db-f33a-4bb7-8a10-4b2dd1c62219/sys
I: 10mount: Unmounting 
/run/schroot/mount/stretch-amd64-sbuild-a31860db-f33a-4bb7-8a10-4b2dd1c62219/proc
I: 10mount: Unmounting 
/run/schroot/mount/stretch-amd64-sbuild-a31860db-f33a-4bb7-8a10-4b2dd1c62219
I: Executing ‘05union setup-stop ok’
I: Executing ‘05lvm setup-stop ok’
I: Executing ‘05file setup-stop ok’
I: 05file: Purging 
/var/lib/schroot/unpack/stretch-amd64-sbuild-a31860db-f33a-4bb7-8a10-4b2dd1c62219
I: Executing ‘05btrfs setup-stop ok’
I: Executing ‘00check setup-stop ok’

The normal user who is trying to run the schroot is 'gatuno'. It doesn't 
work even with the "--directory" option (same result):

E: Failed to change to directory ‘/tmp’: Permission denied
I: The directory does not exist inside the chroot.  Use the --directory 
option to run the command in a different directory.

If schroot need special configuration to run as normal user, please 
explain it. Also, sudo is unconfigured, and the normal user doesn't 
belong to sudo group.

Thanks for reading.

-- System Information:
Debian Release: 9.1
   APT prefers stable
   APT policy: (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.9.0-3-amd64 (SMP w/1 CPU core)
Locale: LANG=es_MX.UTF-8, LC_CTYPE=es_MX.UTF-8 (charmap=UTF-8), 
LANGUAGE=es_MX:es (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages schroot depends on:
ii  libboost-filesystem1.62.0       1.62.0+dfsg-4
ii  libboost-iostreams1.62.0        1.62.0+dfsg-4
ii  libboost-program-options1.62.0  1.62.0+dfsg-4
ii  libboost-system1.62.0           1.62.0+dfsg-4
ii  libc6                           2.24-11+deb9u1
ii  libgcc1                         1:6.3.0-18
ii  libpam0g                        1.1.8-3.6
ii  libstdc++6                      6.3.0-18
ii  libuuid1                        2.29.2-1
ii  lsb-base                        9.20161125
ii  schroot-common                  1.6.10-3

schroot recommends no packages.

Versions of packages schroot suggests:
pn  aufs-tools | unionfs-fuse  <none>
pn  btrfs-tools                <none>
ii  debootstrap                1.0.89
pn  lvm2                       <none>
pn  qemu-user-static           <none>

-- no debconf information

-- 
Atte. Félix Arreola
«Sin firma GPG»



More information about the Buildd-tools-devel mailing list