Re: Possible to undo subvol delete?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Dec 02, 2014 at 01:52:52PM +0100, David Sterba wrote:
> > On a side note...only root can delete subvolumes, but non-root users
> > can create them, which results in...this:
> > 
> > 	$ /sbin/btrfs sub create foo
> > 	Create subvolume './foo'
> > 	$ date > foo/bar
> > 	$ /sbin/btrfs sub delete foo
> > 	Transaction commit: none (default)
> > 	Delete subvolume '/home/testuser/foo'
> > 	ERROR: cannot delete '/home/testuser/foo' - Operation not permitted
> > 	$ rm -rf foo
> > 	rm: cannot remove `foo': Operation not permitted
> > 	$ cat /proc/version
> > 	Linux version 3.17.1-zb64+ (root@buildbot) (gcc version 4.7.2 (Debian 4.7.2-5) ) #1 SMP PREEMPT Tue Oct 21 00:17:49 EDT 2014
> > 
> > ...uh oh?
> 
> That's how it works now. I'd like to enable the user to delete their
> subvolumes even without the user_subvol_rm_allowed option someday.

That seems...odd.  It should be symmetrical, i.e. if you can create a
subvol you should be able to delete it, and if can't delete a subvol
then you shouldn't be able to create them either.  I can imagine
quite a bit of havoc could be wrought by an unprivileged user creating
subvols indiscriminately (or in various specific, targeted locations).

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux