The following pull request was submitted through Github.
It can be accessed and reviewed at: https://github.com/lxc/lxd/pull/7134

This e-mail was sent by the LXC bot, direct replies will not reach the author
unless they happen to be subscribed to this list.

=== Description (from pull-request) ===
Signed-off-by: Stéphane Graber <stgra...@ubuntu.com>
From 864cf2e28aee0d54890bd2ab3ca0c9f2d6a794fb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgra...@ubuntu.com>
Date: Sat, 4 Apr 2020 17:39:18 -0400
Subject: [PATCH] lxd/storage/btrfs: Workaround permission issue
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Stéphane Graber <stgra...@ubuntu.com>
---
 lxd/storage/drivers/driver_btrfs_utils.go | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lxd/storage/drivers/driver_btrfs_utils.go 
b/lxd/storage/drivers/driver_btrfs_utils.go
index e21ba39c4f..e097cfbd60 100644
--- a/lxd/storage/drivers/driver_btrfs_utils.go
+++ b/lxd/storage/drivers/driver_btrfs_utils.go
@@ -160,6 +160,10 @@ func (d *btrfs) deleteSubvolume(path string, recursion 
bool) error {
                // Attempt to make the subvolume writable.
                shared.RunCommand("btrfs", "property", "set", path, "ro", 
"false")
 
+               // Temporarily change ownership & mode to help with nesting.
+               os.Chmod(path, 0700)
+               os.Chown(path, 0, 0)
+
                // Delete the subvolume itself.
                _, err = shared.RunCommand("btrfs", "subvolume", "delete", path)
 
_______________________________________________
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to