Debian Bug report logs - #686292
adt-run fails with permission denied with option --user

version graph

Package: autopkgtest; Maintainer for autopkgtest is Autopkgtest team <autopkgtest-devel@lists.alioth.debian.org>; Source for autopkgtest is src:autopkgtest (PTS, buildd, popcon).

Reported by: Jean-Baptiste Lallement <jeanbaptiste.lallement@gmail.com>

Date: Thu, 30 Aug 2012 21:54:01 UTC

Severity: normal

Tags: patch

Found in version autopkgtest/2.2.3

Fixed in version autopkgtest/2.2.4

Done: Martin Pitt <mpitt@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Autopkgtest team <autopkgtest-devel@lists.alioth.debian.org>:
Bug#686292; Package autopkgtest. (Thu, 30 Aug 2012 21:54:04 GMT) (full text, mbox, link).


Acknowledgement sent to Jean-Baptiste Lallement <jeanbaptiste.lallement@gmail.com>:
New Bug report received and forwarded. Copy sent to Autopkgtest team <autopkgtest-devel@lists.alioth.debian.org>. (Thu, 30 Aug 2012 21:54:04 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Jean-Baptiste Lallement <jeanbaptiste.lallement@gmail.com>
To: submit@bugs.debian.org
Subject: adt-run fails with permission denied with option --user
Date: Thu, 30 Aug 2012 23:50:20 +0200
Package: autopkgtest
Version: 2.2.3
Severity: normal


With option --user, adt-run fails with permission denied when it creates 
tmpdir

The issue is that the top level temporary directory is owned by root 
with permission 0700

Below the output of adt-run for postgresql-common:

$ sudo adt-run -d --leave-lang --unbuilt-tree . --user=ubuntu  --- 
adt-virt-null

adt-run: trace1: options: <Values at 0x9207ccc: {'set_lang': False, 
'timeout_install': None, 'binaries_fortests': 'auto', 'actions': 
[<Action ubtree ubtree0 <AF@ubtree0-ubtree~.:./!|-/>>], 'VSERVER_DUMMY': 
None, 'unbuilt_tree': None, 'timeout_test': None, 'tmp': None, 'binary': 
None, 'timeout_factor': 1.0, 'timeout_short': None, 'vserver': 
['adt-virt-null'], 'source': None, 'output_dir': None, 'debuglevel': 1, 
'gainroot': None, 'timeout_build': None, 'built_binaries_filter': None, 
'user': 'ubuntu', 'logfile': None, 'override_control': None, 
'gnupghome': '~/.autopkgtest/gpg', 'quiet': False, 'summary': None, 
'built_tree': None, 'binaries': 'auto', 'binaries_forbuilds': 'auto'}>; 
timeouts: {'test': 10000, 'short': 100, 'build': 100000, 'install': 3000}
adt-run: trace: ** init
adt-run: trace: ** start
adt-run: trace: $ vserver: adt-virt-null
adt-run: trace: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ starting
adt-run: trace: ** open, scratch=None
adt-run: trace: ** cmdl = ['sh', '-c', 'exec "$@"', 'x']
adt-run: trace: * initialising
adt-run: trace: * no key generation needed
adt-run: trace: * reset
adt-run: trace: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ builds ...
adt-run: trace: @@@@@@@@@@@@@@@@@@@@ ubtree ubtree0
adt-run: trace1: ** blame += arg:.
adt-run: trace1: ** prepare1, modified=False, deps_processed=[], deps_new=[]
adt-run: trace1: ** needs_reset, previously=False
adt-run: trace: $ ubtree0-extract: sh -ec <SCRIPT> x 
/tmp/tmp.8kHsrdmpjH/ubtree0-build/tmpdir 
/tmp/tmp.8kHsrdmpjH/ubtree0-build/real-tree
adt-run: trace1: $     exec 3>&1 >&2
adt-run: trace1: $     set -x
adt-run: trace1: $     spec="$2"
adt-run: trace1: $     origpwd=`pwd`
adt-run: trace1: $     cd /tmp/tmp.8kHsrdmpjH/ubtree0-build
adt-run: trace1: $     chown ubuntu .
adt-run: trace1: $     TMPDIR="$1"
adt-run: trace1: $     rm -rf -- "$TMPDIR"
adt-run: trace1: $     export TMPDIR
adt-run: trace1: $     su ubuntu -c 'mkdir -- "$TMPDIR"'
adt-run: trace1: $     spec="$spec" origpwd="$origpwd" su ubuntu -c '
adt-run: trace1: $                      rm -rf "$spec"
adt-run: trace1: $                      mkdir "$spec"
adt-run: trace1: $                      cp -rP 
--preserve=timestamps,links -- "$origpwd"/. "$spec"/.
adt-run: trace1: $                      '
adt-run: trace1: $     cd [a-z0-9]*-*/.
adt-run: trace1: $     pwd >&3
adt-run: trace1: $     set +e; test -f debian/tests/control; echo $? >&3
+ spec=/tmp/tmp.8kHsrdmpjH/ubtree0-build/real-tree
+ pwd
+ origpwd=/tmp/tmp.8kHsrdmpjH/ubtree0-ubtree
+ cd /tmp/tmp.8kHsrdmpjH/ubtree0-build
+ chown ubuntu .
+ TMPDIR=/tmp/tmp.8kHsrdmpjH/ubtree0-build/tmpdir
+ rm -rf -- /tmp/tmp.8kHsrdmpjH/ubtree0-build/tmpdir
+ export TMPDIR
+ su ubuntu -c mkdir -- "$TMPDIR"
mkdir: cannot create directory 
`/tmp/tmp.8kHsrdmpjH/ubtree0-build/tmpdir': Permission denied
blame: arg:.
badpkg: rules extract failed with exit code 1
adt-run: erroneous package: rules extract failed with exit code 1
adt-run: trace: ** stop
adt-run: trace: ** close, 
scratch=tb-scratch~/tmp/tmp.8kHsrdmpjH:-/|/tmp/tmp.8kHsrdmpjH/!



Information forwarded to debian-bugs-dist@lists.debian.org, Autopkgtest team <autopkgtest-devel@lists.alioth.debian.org>:
Bug#686292; Package autopkgtest. (Thu, 30 Aug 2012 23:12:03 GMT) (full text, mbox, link).


Acknowledgement sent to Jean-Baptiste Lallement <jeanbaptiste.lallement@gmail.com>:
Extra info received and forwarded to list. Copy sent to Autopkgtest team <autopkgtest-devel@lists.alioth.debian.org>. (Thu, 30 Aug 2012 23:12:04 GMT) (full text, mbox, link).


Message #10 received at 686292@bugs.debian.org (full text, mbox, reply):

From: Jean-Baptiste Lallement <jeanbaptiste.lallement@gmail.com>
To: 686292@bugs.debian.org
Subject: patch - adt-run fails with permission denied with option --user
Date: Fri, 31 Aug 2012 01:09:03 +0200
Here is a proposition of patch

--- runner/adt-run      2012-07-08 21:57:26.000000000 +0000
+++ /usr/bin/adt-run    2012-08-30 22:13:14.260003073 +0000
@@ -1673,7 +1673,7 @@
        ]

        if opts.user:
-               script += ([ 'chown '+opts.user+' .' ] +
+               script += ([ 'chown '+opts.user+' . ..', ] +
                        tmpdir_script +
                        [ 'spec="$spec" origpwd="$origpwd" '
                                +opts.user_wrap(create_command) ])



Added tag(s) patch. Request was from Martin Pitt <martin.pitt@ubuntu.com> to control@bugs.debian.org. (Wed, 05 Jun 2013 14:15:06 GMT) (full text, mbox, link).


Added tag(s) pending. Request was from Martin Pitt <martin.pitt@ubuntu.com> to control@bugs.debian.org. (Thu, 27 Jun 2013 11:06:07 GMT) (full text, mbox, link).


Reply sent to Martin Pitt <mpitt@debian.org>:
You have taken responsibility. (Thu, 27 Jun 2013 12:06:11 GMT) (full text, mbox, link).


Notification sent to Jean-Baptiste Lallement <jeanbaptiste.lallement@gmail.com>:
Bug acknowledged by developer. (Thu, 27 Jun 2013 12:06:11 GMT) (full text, mbox, link).


Message #19 received at 686292-close@bugs.debian.org (full text, mbox, reply):

From: Martin Pitt <mpitt@debian.org>
To: 686292-close@bugs.debian.org
Subject: Bug#686292: fixed in autopkgtest 2.2.4
Date: Thu, 27 Jun 2013 12:02:56 +0000
Source: autopkgtest
Source-Version: 2.2.4

We believe that the bug you reported is fixed in the latest version of
autopkgtest, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 686292@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Martin Pitt <mpitt@debian.org> (supplier of updated autopkgtest package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Thu, 27 Jun 2013 13:49:25 +0200
Source: autopkgtest
Binary: autopkgtest autopkgtest-xenlvm
Architecture: source all
Version: 2.2.4
Distribution: unstable
Urgency: low
Maintainer: Autopkgtest team <autopkgtest-devel@lists.alioth.debian.org>
Changed-By: Martin Pitt <mpitt@debian.org>
Description: 
 autopkgtest - automatic as-installed testing for Debian packages
 autopkgtest-xenlvm - Xen/LVM2 based testbed snapshot system
Closes: 686292 693540 695797
Changes: 
 autopkgtest (2.2.4) unstable; urgency=low
 .
   [Jean-Baptiste Lallement]
   * Fix failure with "permission denied" with option --user. Closes: #686292,
     LP: #1084116
   * Use debian.deb822 Python module to parse control files. This fixes parsing
     of folded dependencies. Closes: #695797, LP: #1073856
   * Support versioned dependencies in debian/tests/control.
     Closes: #693540, LP: #1164362
 .
   [ Martin Pitt ]
   * Add myself as a co-maintainer, as per mailing list discussion.
   * Add machine-readable debian/copyright as per current 1.0 standard. Remove
     dynamic creation of debian/copyright from debian/rules.
   * Move from deprecated dh compat level 4 to 8 (supported in squeeze).
   * debian/rules: Use dh_installdocs to install copyright file instead of
     custom shell code.
   * debian/control: Add missing ${misc:Depends}.
   * Bump Standards-Version to 3.9.4.
Checksums-Sha1: 
 9b145f564decd70bd56c3b5042a5888433cbbbb5 1714 autopkgtest_2.2.4.dsc
 32fa180b8dd7b23f2ba58d0b41d066822f5b0709 78283 autopkgtest_2.2.4.tar.gz
 8df33f248dfd40939cfb5d7c9406d5bdc4678eda 66090 autopkgtest_2.2.4_all.deb
 3615cc233083aea4447c07022a7d859cabf53a24 27436 autopkgtest-xenlvm_2.2.4_all.deb
Checksums-Sha256: 
 4def5cdf65e5a63f4044075d5507bac3bfea5fc5e08528b6df22e696aa5521cd 1714 autopkgtest_2.2.4.dsc
 1d50b8bcf341bb9aa20d553021351c1e131240d9bf1909a2abfe973d084c92b6 78283 autopkgtest_2.2.4.tar.gz
 c4bc953f92943bc7fb5c891f52c6c1b27df377f0c1af1bfe63039820f533b65e 66090 autopkgtest_2.2.4_all.deb
 503fa40916cbefe2b8ef20f13d1f07c4faa655a72974db4862de2561b0ed4fd0 27436 autopkgtest-xenlvm_2.2.4_all.deb
Files: 
 3e2bec1b0b1e33f4842f99baad6f477d 1714 devel optional autopkgtest_2.2.4.dsc
 58b15222d7ac3ec5593e1610954e9129 78283 devel optional autopkgtest_2.2.4.tar.gz
 58158b3869465deb8ac48e2bb0e728b4 66090 devel optional autopkgtest_2.2.4_all.deb
 8d0211ffd63df454cb765378a6943a37 27436 devel optional autopkgtest-xenlvm_2.2.4_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iQIcBAEBCAAGBQJRzCcjAAoJENFO8V2v4RNH83YQAJWt6PToRSCP+z/cLE1/4/ui
nIoI7VWW6AjN7zY2joI8mp/zXc1tCZOL61aocpV7VjROoSzUHULLU3ZVraVGK147
snN4RDzzji2gtaXg0ZR5V4oBKHzdBePXg+jN52EXasR/dNkdnxsskScFnAWJqTAO
mE1H0jVC0D1u3V35Uu/dgx4qy+8yF1Jb1oefoF876RCIibObUzeAMBPQJ6sFSF6l
A+9u+svIYKRMIf0o6ycH7Q/87mE2BZ2xikJj6Eoka5/zLREOkwvmsDHzzzYHCG8X
3aiA/GjVUTn6VXVUEiJljHnJ1y+2zf1AJel7z+0mmuS3hMIyQcGDaX/zkTywCNM5
i+pBome1rVGGJYoka9XWKvTqC6H4HC6P0/zFvC0JojW7YY+X3iRxTUcz4a5oIGzg
IAwzxKzJs2B0BkvW2Jw400kR1eI48EgO3R7qvMZxZmtyrwFeKQF4zkCJpgBOAxQQ
bjjdvpHGxuiA8GUwcDJsYmRu1PVWxQqGrSP0mEoyAsUQsVPZ4kEJBNyqeF80HlN4
M33eJtT7sPkNf8Ixt++IWg1JvPwwZR55Ick3N33x6l3Jpv4ABSGa0GYZvgsDgo1p
Y1t+xGEFaWPPphiiqXd6nru2NIjBW58chJk2jhLEwtHm7bh+GFsmUE2IAT+G5IIu
4YO7C978jwdPg/KFuNsg
=3YXg
-----END PGP SIGNATURE-----




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Mon, 05 Aug 2013 07:34:20 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sat Jan 13 16:19:15 2018; Machine Name: beach

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.