gmirror and normal users?

2011-04-08 Thread Christopher Hilton
Should a normal user be able to successfully:

 $ gmirror remove /dev/mirror/gm0 /dev/ad6

Or is this something that's just unlocked because I haven't mounted the drive 
yet?

$ uname -a
FreeBSD deathstar.example.com 8.2-STABLE FreeBSD 8.2-STABLE #1: Wed Apr  6 
13:09:37 EDT 2011 root@dagobah:/usr/obj/usr/src/sys/GENERIC  i386
$ id
uid=1001(chris) gid=1001(chris) 
groups=1001(chris),0(wheel),5(operator),1000(users)


Chris Hilton   tildeChris -- http://myblog.vindaloo.com
e: -- chris /at/ vindaloo /dot/ com
.~~.--.~~.--.~~.--.~~.--.~~.--.~~.--.~~.--.~~.--.~~.--.~~.--.~~.--.~~.--.~~.
I'm on the outside looking inside, What do I see?
  Much confusion, disillusion, all around me.
-- Ian McDonald / Peter Sinfield

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: gmirror and normal users?

2011-04-08 Thread Ivan Voras

On 08/04/2011 16:43, Christopher Hilton wrote:

Should a normal user be able to successfully:

  $ gmirror remove /dev/mirror/gm0 /dev/ad6

Or is this something that's just unlocked because I haven't mounted the drive 
yet?

$ uname -a
FreeBSD deathstar.example.com 8.2-STABLE FreeBSD 8.2-STABLE #1: Wed Apr  6 
13:09:37 EDT 2011 root@dagobah:/usr/obj/usr/src/sys/GENERIC  i386
$ id
uid=1001(chris) gid=1001(chris) 
groups=1001(chris),0(wheel),5(operator),1000(users)


It is because of the operator group. Normal users which are not in 
this groups would not be able to do it.


If a user can communicate with the device (i.e. has at least reads 
rights to it), he can send GEOM commands to it. The operator group has 
read permissions by default:


lara:~ ll /dev/mirror/
total 0
crw-r-  1 root  operator0, 150  8 Apr 16:55 bla

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org