Bug 235047 - net/samba48: "failed to get quota for group ID" errors on FreeBSD 12 and ZFS
Summary: net/samba48: "failed to get quota for group ID" errors on FreeBSD 12 and ZFS
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Kubilay Kocak
Keywords: regression
Depends on:
Reported: 2019-01-18 13:45 UTC by Gerard Seibert
Modified: 2019-12-15 11:50 UTC (History)
1 user (show)

See Also:

Error messages emited by Samba (3.10 KB, text/plain)
2019-01-18 13:45 UTC, Gerard Seibert
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gerard Seibert 2019-01-18 13:45:49 UTC
Created attachment 201235 [details]
Error messages emited by Samba

freebsd-version 12.0-RELEASE-p2
FreeBSD scorpio.seibercom.net 12.0-RELEASE-p2 FreeBSD 12.0-RELEASE-p2 GENERIC  amd64

Ever since updating from FreeBSD 11 to FreeBSD 12, I have experienced a
problem with samba. While still on FreeBSD 11, I configured a Windows
10 machine to write backups of selected directories to my FreeBSD
machine. That worked perfectly. No problems were detected and
everything was backed up correctly. However, after updating to FreeBSD
12 a problem has arisen. While the backups do apparently succeed
successfully, the screen on my FreeBSD machine fills up with error
messages while the backup is happening. I have attached a copy of the latest error messages.

I posted on the Samba mail forum and received this reply:

You're getting this due to the error code being returned in errno
not being one that Samba expects. Here's the underlying code:

       ret = quotactl(path, cmd, id, qblk);
        if (ret == -1) {
                /* ENOTSUP means quota support is not compiled in. EINVAL
                 * means that quotas are not configured (commonly).
                if (errno != ENOTSUP && errno != EINVAL) {
                        DEBUG(0, ("failed to %s quota for %s ID %u on %s: %s\n",
                                    (cmd & QCMD(Q_GETQUOTA, 0)) ? "get" : "set",
                                    (cmd & QCMD(0, GRPQUOTA)) ? "group" : "user",
                                    (unsigned)id, path, strerror(errno)));

Looks like your system is returning ENOENT here in errno, not ENOTSUP or EINVAL.

Since this worked correctly on FreeBSD 11, I believe that I can safely assume that something changed drastically between FreeBSD 11 & FreeBSD 12. I did notice that ZFS was updated. Perhaps that is the cause of this.

In any case, I don't know exactly where to report this, so I thought I would start here.
Comment 1 Dries Michiels 2019-01-18 21:18:22 UTC
Relatable bug which has recently been fixed :).

Comment 2 Kubilay Kocak freebsd_committer freebsd_triage 2019-12-15 11:50:26 UTC

- Recategorize (ports issue)
- Fixed by base issue/regression (bug 234413)
- Affects Some People (conditional on specific FreeBSD version & ZFS)

Thank you for the heads up on this bugs resolution Dries