Open JMoVS opened 9 years ago
Are you claiming that zfs snapshot should run without root privilege?
The test suite says otherwise...see (https://github.com/openzfsonosx/zfs-test/blob/master/test/zfs-tests/tests/functional/cli_user/misc/zfs_snapshot_001_neg.ksh)
(ah oops. I saw bookmark and looked at the snapshot test - sorry).
sry, I was inprecise. The error message thrown is
"unknown error"
whereas in the case of snapshot command run without sudo, it is
permission denied
Aside from that, in the test:
if datasetexists $TESTPOOL/$TESTFS@usersnap1
then
log_fail "Snapshot $TESTPOOL/$TESTFS@usersnap1 was taken !"
fi
log_pass "zfs snapshot returns an error when run as a user"
doesn't the log_pass outside of the if statement mean that it will always no matter what log_pass "zfs snapshot returns an error when run as user"?
log_fail terminates the test
On 25 Aug 2015, at 5:47 PM, JMoVS notifications@github.com wrote:
sry, I was inprecise. The error message thrown is "unknown error" whereas in the case of snapshot command run without sudo, it is permission denied`
Aside from that, in the test:
if datasetexists $TESTPOOL/$TESTFS@usersnap1 then log_fail "Snapshot $TESTPOOL/$TESTFS@usersnap1 was taken !" fi
log_pass "zfs snapshot returns an error when run as a user" doesn't the log_pass outside of the if statement mean that it will always no matter what log_pass "zfs snapshot returns an error when run as user"?
— Reply to this email directly or view it on GitHub https://github.com/openzfsonosx/zfs/issues/364#issuecomment-134513071.
ah ok. Do you consider the "unknown error" instead of he "permission denied" error message a bug?
Not sure! Admittedly it is not a nice error message and inconsistent with the snapshot output. We should compare with the output of iIlumos, that is our standard guide.
Brendon
On 25 Aug 2015, at 5:50 PM, JMoVS notifications@github.com wrote:
ah ok. Do you consider the "unknown error" instead of he "permission denied" error message a bug?
— Reply to this email directly or view it on GitHub https://github.com/openzfsonosx/zfs/issues/364#issuecomment-134513606.
I am not competent to check that myself, will you do that?
yes.
On 25 Aug 2015, at 6:02 PM, JMoVS notifications@github.com wrote:
I am not competent to check that myself, will you do that?
— Reply to this email directly or view it on GitHub https://github.com/openzfsonosx/zfs/issues/364#issuecomment-134515670.
I think it's an illumos "bug" because there's no specific handling for EPERM or EACCES: https://github.com/openzfsonosx/zfs/blob/master/cmd/zfs/zfs_main.c#L6864-L6883
One way to fix this would be to call zfs_standard_error, as is done here: https://github.com/openzfsonosx/zfs/blob/master/cmd/zfs/zfs_main.c#L1350-L1351
This is not the sort of thing we would usually unilaterally change.
I am running the 1.4.0 version provided by @ilovezfs and it shows me an "unknown error" when I try to make sth like:
zfs bookmark tank@abc tank#abc
it quits with
"cannot create bookmark 'tank#abc': unknown error"
when I execute it with
sudo
, it works fine.