diff --git a/cmd/zfs/zfs_main.c b/cmd/zfs/zfs_main.c index 75c0e40b61..2941efe2f6 100644 --- a/cmd/zfs/zfs_main.c +++ b/cmd/zfs/zfs_main.c @@ -7445,9 +7445,14 @@ unshare_unmount_path(int op, char *path, int flags, boolean_t is_manual) } (void) fprintf(stderr, gettext("warning: %s not in" "/proc/self/mounts\n"), path); - if ((ret = umount2(path, flags)) != 0) + if ((ret = umount2(path, flags)) != 0) { (void) fprintf(stderr, gettext("%s: %s\n"), path, strerror(errno)); + if (ret == EPERM && geteuid() != 0) { + (void) fprintf(stderr, gettext("filesystems " + "may only be unmounted by root\n")); + } + } return (ret != 0); } path_inode = statbuf.st_ino;