0

I migrated a CentOS 6 install to Debian 10 and btrfs snapshotting is heavily used on these system. Under CentOS I can easily have two users - user1 and user2, which are part of group - user1user2group. When I do a snapshot with one of the users and have g+rw on this snapshot the other used should be able to snapshot this subvolume as well:

user1@somehost:/BTRFS$ mkdir folder 
user1@somehost:/BTRFS$ chown user1:user1user2group folder/             
user1@somehost:/BTRFS$ chmod 770 folder/ 
user1@somehost:/BTRFS$ cd folder/ 
user1@somehost:/BTRFS/folder$ btrfs subvolume create snap-shot 
    Create subvolume './snap-shot' 
user1@somehost:/BTRFS/folder$ chown user1:user1user2group snap-shot/ 
user1@somehost:/BTRFS/folder$ chmod 770 snap-shot/ 
user1@somehost:/BTRFS/folder$ su - user2 
user2@somehost:~$ cd /BTRFS/folder 
user2@somehost:/BTRFS/folder$ ls -lah 

   total 0 
   drwxrwx--- 1 user1 user1user2group  18 Jul  5 08:02 . 
   drwxrwx--- 1 user1 user1user2group  12 Jul  5 08:02 .. 
   drwxrwx--- 1 user1 user1user2group  0 Jul  5 08:03 snap-shot 

I validate user2 has the correct rights over "snap-shot" and "folder" with simple copy:

user2@somehost:/BTRFS/folder$ cp -pr snap-shot copy-snap-shot

Then I try to create the snapshot as user2 on Debian 10:

user2@somehost:/BTRFS/folder$ btrfs subvolume snapshot snap-shot/ 
user2-snapshot Create a snapshot of 'snap-shot/' in './user2-snapshot' ERROR: cannot 
snapshot 'snap-shot/': Operation not permitted

On CentOS the last command returns success:

Create a snapshot of 'snap-shot/' in 'user2-snapshot'

I know a lot of things changed in BTRFS for the last many years, but I find this rather basic functionality. Does anyone have an idea if this can be worked around?

2
  • Probably already didn't work in CentOS 7: git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/log/… . Wasn't applied to 2.6.32 . It's up to you to search if it was applied in RHEL6/CentOS6's patched version (and thus wouldn't be the culprit).
    – A.B
    Jul 5, 2021 at 8:57
  • @A.B Thank you for the reply. I guess this is exactly what we are talking about. I guess I will have to invent some workaround with sudo btrfs for the moment. Your answer should be the correct one. I don't see any button to do that. Probably something with my account.
    – tio78
    Jul 5, 2021 at 11:52

1 Answer 1

0

@A.B Found the patch, which introduces this change, so I would consider this answered.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .