From owner-freebsd-questions@FreeBSD.ORG Thu May 29 12:39:51 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E92491065671 for ; Thu, 29 May 2008 12:39:51 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (chello087206046210.chello.pl [87.206.46.210]) by mx1.freebsd.org (Postfix) with ESMTP id 5170E8FC1B for ; Thu, 29 May 2008 12:39:51 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id DC6E145C99; Thu, 29 May 2008 14:08:55 +0200 (CEST) Received: from localhost (pjd.wheel.pl [10.0.1.1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id A10F645685; Thu, 29 May 2008 14:08:42 +0200 (CEST) Date: Thu, 29 May 2008 14:08:43 +0200 From: Pawel Jakub Dawidek To: Mark Kane Message-ID: <20080529120843.GF3159@garage.freebsd.pl> References: <1207919596.3113.1.camel@norman-laptop> <20080411134128.7fc373b0@mkproductions.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ChQOR20MqfxkMJg9" Content-Disposition: inline In-Reply-To: <20080411134128.7fc373b0@mkproductions.org> User-Agent: Mutt/1.4.2.3i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 8.0-CURRENT i386 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-5.9 required=3.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.0.4 Cc: freebsd-questions , Norman Maurer Subject: Re: zfs list and non-root user X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 May 2008 12:39:52 -0000 --ChQOR20MqfxkMJg9 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Apr 11, 2008 at 01:41:28PM -0500, Mark Kane wrote: > On Fri, Apr 11, 2008, at 15:13:16 +0200, Norman Maurer wrote: > > Hi all, > >=20 > > is it normal that I can't do a 'zfs list' ( for example ) as non-root > > user ?=20 > >=20 > > $ zfs list > > internal error: failed to initialize ZFS library > >=20 > > I think there is really a use case for use some zfs commands as > > non-root user.. > >=20 > > Thx > > Norman >=20 > Hi. >=20 > One way to do this as a non-root user is to add the account to the > "operator" group. This is what I do on my personal desktop machine > and it has worked fine, but I understand that may not be best in all > cases. >=20 > You might also try changing the permissions on /dev/zfs. I don't do > this method and I'm not sure if it's a proper way, but from trying it > very briefly it seems to work correctly with the user not in the > "operator" group. In Solaris anyone can open /dev/zfs and the kernel side of ZFS decides if the user has permission to perform some action or not. In FreeBSD we try to be more careful for now, but it will change soon, once we import delegated administration functionality. Although... The error above (failed to initialize ZFS library) most likely means that zfs.ko module wasn't loaded. zfs(8) tries to do that automatically, but of course it will only succeed if we are root. In this case zfs.ko has to be manually loaded by root and then members of operator group can use zfs(8) command. --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --ChQOR20MqfxkMJg9 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) iD8DBQFIPpzKForvXbEpPzQRApEiAKCrWHo3fQWHbfZpDAbPfdNwqkdKagCgrVRS 6MBLqrS6l+eiSd0QR24Ybhs= =w185 -----END PGP SIGNATURE----- --ChQOR20MqfxkMJg9--