lxc file push creates broken permissions

Bug #1548878 reported by Martin Pitt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lxd (Ubuntu)
Fix Released
High
Stéphane Graber

Bug Description

Files in the container transferred with "lxc file push" have very bad default permissions:

$ lxc launch images:ubuntu/xenial/amd64
$ echo hello | lxc file push - odontoid-corinne/tmp/hello.txt
$ lxc exec odontoid-corinne -- ls -l /tmp/
total 4
---x--x--- 1 ubuntu ubuntu 6 Feb 23 15:40 hello.txt

Even specifying them explicitly with --mode is broken:

$ echo hello | lxc file push --mode=644 - odontoid-corinne/tmp/hello.txt
$ lxc exec odontoid-corinne -- ls -l /tmp/
total 4
--w-r--r-- 1 ubuntu ubuntu 6 Feb 23 15:42 hello.txt

$ echo hello | lxc file push --mode=444 - odontoid-corinne/tmp/hello.txt
$ lxc exec odontoid-corinne -- ls -l /tmp/
total 4
-rw-r-xr-- 1 ubuntu ubuntu 6 Feb 23 15:43 hello.txt

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: lxd 2.0.0~beta3-0ubuntu4
ProcVersionSignature: Ubuntu 4.4.0-6.21-generic 4.4.1
Uname: Linux 4.4.0-6-generic x86_64
ApportVersion: 2.20-0ubuntu3
Architecture: amd64
CurrentDesktop: i3
Date: Tue Feb 23 16:42:19 2016
EcryptfsInUse: Yes
SourcePackage: lxd
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Martin Pitt (pitti) wrote :
Revision history for this message
Martin Pitt (pitti) wrote :

This broke adt-virt-lxd, and I'm using this fairly recently, so this smells like a rather recent regression.

Revision history for this message
Stéphane Graber (stgraber) wrote :

Wow, that's pretty broken indeed, I'll take a look.

Changed in lxd (Ubuntu):
status: New → Triaged
assignee: nobody → Stéphane Graber (stgraber)
importance: Undecided → High
Revision history for this message
Stéphane Graber (stgraber) wrote :

Got a fix for this, will be in beta4.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package lxd - 2.0.0~beta4-0ubuntu1

---------------
lxd (2.0.0~beta4-0ubuntu1) xenial; urgency=medium

  * New upstream release (2.0.0~beta4):
    - The API versioning data at /1.0 has changed, now includes,
      api_status, api_version and api_extensions
    - Architecture fields are now returned as strings instead of obscure
      integer
    - GET /1.0/containers/NAME/state has been reworked, now includes
      more detailed network information, disk usage information as well as
      memory consumption data.
    - New --fast mode for "lxc list" which only lists "cheap" fields
    - The container architecture is now listed in "lxc info"
    - Add process count limit (pids cgroup)
    - Fix container creation from remote image alias
    - Fix Content-Type value for errors
    - Don't stop containers before asking the user
    - Re-implement terminal functions through cgo (fixes ppc64el)
    - Allow access to /dev/zero
    - tests: Keep pprof self-contained
    - Use iproute2 instead of bridge-utils
    - lxd-images: Fix sync
    - allow cgroupfs mounting on cgns kernels
    - Optimize container process count (use pid cgroup)
    - Fix file push permissions (LP: #1548878)
    - list: Query containers by batch of 10
    - Only re-balance on host network changes
    - list: Attempt to optimize the go routines slightly
  * Move adduser logic to preinst.

 -- Stéphane Graber <email address hidden> Tue, 23 Feb 2016 19:59:21 -0500

Changed in lxd (Ubuntu):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.