Control: severity -1 normal

Hi,

On Sun, 11 Nov 2018 18:07:56 +0100 Cyril Brulebois <k...@debian.org> wrote:
> I can reproduce this issue on a stretch system, installed with jessie
> then upgraded, with some tweaks. Accessing old chroots is OK, but the
> newly created stretch one isn't accessible:
> 
>     E: Access not authorized
>     I: You do not have permission to access the schroot service.
>     I: This failure will be reported.
>     Chroot setup failed
>     Error setting up stretch-amd64-sbuild chroot
> 
> 
> To get all possible tweaks out of the way, I've reproduced this on a
> clean stretch VM, with a default install using a 9.6.0 netinst image.
> 
> Steps to reproduce, with a pre-existing cyril user:
>  - as root:
>       apt-get -y install sbuild sudo
>       adduser cyril sbuild
>       adduser cyril sudo
> 
>  - as cyril:
>       sudo sbuild-createchroot stretch /home/sbuild/stretch-amd64-sbuild 
> http://deb.debian.org/debian
>       sudo mv /etc/schroot/chroot.d/stretch-amd-sbuild-<RANDOM> 
> /etc/schroot/chroot.d/stretch-amd-sbuild
>       sbuild-shell stretch-amd64-sbuild → “E: Access not authorized”
>       sbuild-update -udcar stretch-amd64-sbuild → “E: Access not 
> authorized”
> 
> The same happens when replacing stretch with sid.

understandable, because the sbuild-shell and sbuild-update command permanently
modify the underlying chroot. The chroot you created in
/home/sbuild/stretch-amd64-sbuild was created by the superuser and thus you
need superuser privileges to change its content.

So you can build with sbuild and schroot without sudo but invoking sbuild does
not change the underlying chroot.

If you want to change it (and that's what sbuild-shell and sbuild-update do)
then you do need superuser privileges.

Thanks!

cheers, josch

Attachment: signature.asc
Description: signature

Reply via email to