Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZFS as non-root errors trying to lock unnecessary etab file. #385

Closed
aarcane opened this issue Sep 3, 2011 · 5 comments
Closed

ZFS as non-root errors trying to lock unnecessary etab file. #385

aarcane opened this issue Sep 3, 2011 · 5 comments
Milestone

Comments

@aarcane
Copy link

aarcane commented Sep 3, 2011

when zfs is run as non root via:

chmod /dev/zfs 660;
chgrp zfs /dev/zfs;
gpasswd -a username zfs

zfs and zpool both emit the following error:

exportfs: could not open /var/lib/nfs/.etab.lock for locking: errno 13 (Permission denied)

it then functions as normal, however, is it necessary to lock nfs.etab.lock for this, and other read only commands? I get this error with zfs create, zpool iostat, zpool status, zpool list, and other various commands which have little to no business locking the nfs etab.

@behlendorf
Copy link
Contributor

Yes, this sounds like a bug which just wasn't observed to always running these tools as root. We'll try and limit accessing the etab file to nfs specific commands.

@dajhorn
Copy link
Contributor

dajhorn commented Dec 31, 2011

I think that this ticket is not-a-bug and the reported behavior is arguably correct.

First, ZoL assumes root privileges in its default configuration. The problem is mitigated by customizing the permissions on the exportfs utility and/or the /var/lib/nfs tree in the same way as the permissions on /dev/zfs must be changed to invoke /sbin/zfs as a non-root user.

Second, the error messages are important for the regular configuration, but otherwise cosmetic.

Third, exportfs itself does not accommodate the desired behavior, so consider filing a bug against the NFS package. It isn't immediately obvious why they do that, so breaking the lock from the calling process could be a bad thing.

This ticket might be a bug if ZoL implements delegations, per issue #362, or gets packaging that provisions a system group for zfs, like on Solaris.

@behlendorf
Copy link
Contributor

I'm going to defer this work until we have delegations properly working.

@pdf
Copy link

pdf commented Aug 29, 2014

FWIW, I can't reproduce. With confirmation, I believe this can be closed.

@behlendorf
Copy link
Contributor

This was resolved by commit 4dad7d9. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants