Skip to contentSkip to conversation

btrfs send requires root

DISCUSSION Matthew Lai 2 participants 3 messages Jan 29, 2014 – Jan 30, 2014 Btrfs file system

lore
Share & tools
lore
#0 lore raw

Hello!

I have just started playing with btrfs, and noticed that "btrfs send" only works for root (ERROR: failed to initialize subvol search. Operation not permitted), even on subvolumes created by the user.

Am I doing something wrong? Or is this the intended behaviour?

My setup (/data is the root subvolume):
mkdir /data/snapshots
btrfs subvolume snapshot -r /data /data/snapshots (creates /data/snapshots/data) btrfs send /data/snapshots/data > /dev/null

Returns:
ERROR: can't perform the search- Operation not permitted
ERROR: failed to initialize subvol search. Operation not permitted

Thanks!
Matthew

#1 lore raw
Quoted 5 lines · Matthew Lai

I have just started playing with btrfs, and noticed that "btrfs send" only works for root (ERROR: failed to initialize subvol search. Operation not permitted), even on subvolumes created by the user.

Am I doing something wrong? Or is this the intended behaviour?

Intended but can be revisited to allow non-root owner's to send their snapshots.

Quoted 3 lines

Returns:
ERROR: can't perform the search- Operation not permitted
ERROR: failed to initialize subvol search. Operation not permitted

The SEARCH_TREE ioctl is also root-only and a unconstrained interface to the filesystem internals, so a new ioctl would have to be introduced to do what send needs.

#2 lore raw

Ah I see. Thanks for clarifying!

Matthew

Quoted 19 lines · David Sterba
Quoted 5 lines · Matthew Lai

I have just started playing with btrfs, and noticed that "btrfs send" only works for root (ERROR: failed to initialize subvol search. Operation not permitted), even on subvolumes created by the user.

Am I doing something wrong? Or is this the intended behaviour?

Intended but can be revisited to allow non-root owner's to send their snapshots.

Quoted 3 lines

Returns:
ERROR: can't perform the search- Operation not permitted
ERROR: failed to initialize subvol search. Operation not permitted

The SEARCH_TREE ioctl is also root-only and a unconstrained interface to the filesystem internals, so a new ioctl would have to be introduced to do what send needs.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html