[exim] NFSv4: failed to set ownership on spool file

Inizio della pagina
Delete this message
Reply to this message
Autore: Heiko Schlittermann
Data:  
To: exim users
Oggetto: [exim] NFSv4: failed to set ownership on spool file
Hi,

we run Exim with $spool_directory on a NFSv4 Share. I do not know the gory details
of NFSv4 and what operations are expected to work and which operations are expected to break.

- UID mapping seems to be enabled (the files have the right owner, if the id-mapping domains
on both sides match, otherwise they belong to "nobody").

- The filer is a Hitachi NAS.

- The tcpdump show a V4 SETATTR, but only for the owner (I'd have
expected the group too), AND the owner is numerical, not user@domain,
as I would have expected. The pcap file is attached.

Exim dies on spool file creation, here is the relevant port of the source:

    /* Make sure the file's group is the Exim gid, and double-check the mode
    because the group setting doesn't always get set automatically. */


    if (fchown(data_fd, exim_uid, exim_gid))
    log_write(0, LOG_MAIN|LOG_PANIC_DIE,
        "Failed setting ownership on spool file %s: %s",
        spool_name, strerror(errno));
    (void)fchmod(data_fd, SPOOL_MODE);



My questions:

- Does anybody experience similar problems?

- How did you solve it?

- Would a code change be the right move?


  A) if (stat() and wrong ownership)
        chown(…) or die()


  B) if (chown() or stat() and wrong ownership)
        die()



I'd prefer B, as it has impact only on a limited range of
setups.


    Best regards from Dresden/Germany
    Viele Grüße aus Dresden
    Heiko Schlittermann
--
 SCHLITTERMANN.de ---------------------------- internet & unix support -
 Heiko Schlittermann, Dipl.-Ing. (TU) - {fon,fax}: +49.351.802998{1,3} -
 gnupg encrypted messages are welcome --------------- key ID: F69376CE -
 ! key id 7CBF764A and 972EAC9F are revoked since 2015-01 ------------ -