Public bug reported:
Balance tree action of btrfs command should be limited to only root
user, because it may cause data corrupt and usually result in an
uninterruptible process which is causing a heavy I/O load (the process
may keep runing for a long time because the action is not a easy deal).
Run the following command as a non-root user will also start the balance tree
action ( / is btrfs here, with ext4 /boot):
$ btrfs filesystem balance /
I think this problem will cause serious issues if somebody uses it in a
production system (though it is really not recommended).
What's more, I'm not sure whether this should be a bug in the Linux
kernel/btrfs-tools, because such action is actually performed by using system
calls. If I try to make a snapshot in a directory by a user who does not have
the access, it will generate an error like this:
$ pwd
/home
$ whoami
aron
$ btrfs subvolume snapshot . backhome
Create a snapshot of '.' in './backhome'
ERROR: cannot snapshot '.
I think at least a workaround is needed to be settled in btrfs-tools
(geteuid test) before the kernel side has this problem fixed.
** Affects: btrfs-tools (Ubuntu)
Importance: Undecided
Status: New
** Affects: linux (Ubuntu)
Importance: Undecided
Status: New
** Description changed:
Balance tree action of btrfs command should be limited to only root
user, because it may cause data corrupt and usually result in an
uninterruptible process which is causing a heavy I/O load (the process
may keep runing for a long time because the action is not a easy deal).
- Run the following command as a non-root user will also start the balance
- tree action ( / is btrfs here, with ext4 /boot):
+ Run the following command as a non-root user will also start the balance tree
action ( / is btrfs here, with ext4 /boot):
$ btrfs filesystem balance /
- I think this problem will cause serious issues if somebody uses it in
- a production system (though it is really not recommended), so I give it
- an RC severity. If you think it should be changed, feel free to do it.
+ I think this problem will cause serious issues if somebody uses it in a
+ production system (though it is really not recommended).
- What's more, I'm not sure whether this should be a bug in the Linux kernel,
- because such action is actually performed by using system calls. If I
- try to make a snapshot in a directory by a user who does not have the
- access, it will generate an error like this:
+ What's more, I'm not sure whether this should be a bug in the Linux
kernel/btrfs-tools, because such action is actually performed by using system
calls. If I try to make a snapshot in a directory by a user who does not have
the access, it will generate an error like this:
$ pwd
/home
$ whoami
aron
$ btrfs subvolume snapshot . backhome
Create a snapshot of '.' in './backhome'
- ERROR: cannot snapshot '.'
+ ERROR: cannot snapshot '.
+
+ I think at least a workaround is needed to be settled in btrfs-tools
+ (geteuid test) before the kernel side has this problem fixed.
** Also affects: btrfs-tools (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/695259
Title:
balance tree action should be only triggered by root
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs