From owner-freebsd-questions@FreeBSD.ORG Thu May 29 12:24:56 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 B94D71065671 for ; Thu, 29 May 2008 12:24:56 +0000 (UTC) (envelope-from norman.maurer@googlemail.com) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.155]) by mx1.freebsd.org (Postfix) with ESMTP id 2D9AD8FC2C for ; Thu, 29 May 2008 12:24:55 +0000 (UTC) (envelope-from norman.maurer@googlemail.com) Received: by fg-out-1718.google.com with SMTP id l26so2333762fgb.35 for ; Thu, 29 May 2008 05:24:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; bh=T9lGSJigvRNxwsiCjiTP5uy751Pn+o9/x26CBaJyefE=; b=haHEGwc2K+7YB1Oooxu3OGSvxCvjwRIUiC6Q17FIzdWcrqby879zW2WkwM4zmSktQHynCFxa5lOsI7LjZIMb9kIkwJs9Z8DjJpplL/7AQUmKRz+MuWlSzbjTU7hyCZ80KSYdnJudawTzT0aiINsD1xQaXlRop6Uuypt7rNURgd8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=tsvNY2EJ4GOpS1AgZBApKQu+i4+aqt5UK5i1AsKORqQQpg8OjpRCGWxCxfQs/mTyhhZIIZ+AlfGUSuBlGV8VOCmgShNSLRy5byfDZ7YIpKGJ1TFJiumhCbrmjoLcDb0UopEHlZp1IM9ml5wwfQ9eFSWRhyGbfegmWC7lXLLK+Pw= Received: by 10.86.73.3 with SMTP id v3mr2048639fga.68.1212063894798; Thu, 29 May 2008 05:24:54 -0700 (PDT) Received: by 10.86.97.12 with HTTP; Thu, 29 May 2008 05:24:54 -0700 (PDT) Message-ID: <75bda7a00805290524ieb3987bq7725c75a50f110e6@mail.gmail.com> Date: Thu, 29 May 2008 14:24:54 +0200 From: "Norman Maurer" Sender: norman.maurer@googlemail.com To: "Pawel Jakub Dawidek" In-Reply-To: <20080529120843.GF3159@garage.freebsd.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1207919596.3113.1.camel@norman-laptop> <20080411134128.7fc373b0@mkproductions.org> <20080529120843.GF3159@garage.freebsd.pl> X-Google-Sender-Auth: 704be4675278b57c Cc: Mark Kane , freebsd-questions 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:24:56 -0000 Hi, even if the zfs module is loaded I get the error message: [norman@harmonia ~]$ kldstat | grep zfs 7 1 0xfffffffffcc1c000 80ee8 zfs.ko [norman@harmonia ~]$ zfs list internal error: failed to initialize ZFS library Anyway thx for the info.. At least now I know why it "should" not work ;-) bye Norman 2008/5/29 Pawel Jakub Dawidek : > 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, >> > >> > is it normal that I can't do a 'zfs list' ( for example ) as non-root >> > user ? >> > >> > $ zfs list >> > internal error: failed to initialize ZFS library >> > >> > I think there is really a use case for use some zfs commands as >> > non-root user.. >> > >> > Thx >> > Norman >> >> Hi. >> >> 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. >> >> 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. > > -- > Pawel Jakub Dawidek http://www.wheel.pl > pjd@FreeBSD.org http://www.FreeBSD.org > FreeBSD committer Am I Evil? Yes, I Am! >