[Dovecot] Unable to (un)subscribe mbox with AIX, NFS and netapp filer
Axel Luttgens
AxelLuttgens at swing.be
Mon Jul 6 14:30:45 EEST 2009
Le 6 juil. 09 à 09:47, Ralf Becker a écrit :
> [...]
>
> Jul 6 08:14:32 trevi mail:err|error dovecot: IMAP(beckerr):
> fchown(/u/f0/rzuser/beckerr/Mail/.subscriptions.lock, -1, -1)
> failed: Invalid argument
>
> [...]
>
> The error just appears on NFS mounted shared and I'm not sure if
> AIX or netapp is the cause.
According to the posix specification, fchown may return EINVAL when
the owner or group ID is not a value supported by the implementation,
or when the fildes argument refers to a pipe or socket or an fattach()-
ed STREAM and the implementation disallows execution of fchown() on a
pipe.
Wouldn't it be worth to check what kind of entity gets created under
your environment?
I ask because I wouldn't exclude without further investigations the
possibility of encountering other side effects wrt files throughout
the code.
> So to determine the real problem is
> not easy, but to fix it is:
>
> While uid and gid are both -1 the call could be suppressed, because
> nothing is really changed:
>
> --- ./lib/file-dotlock.c.org 2009-07-06 09:25:14.000000000 +0200
> +++ ./lib/file-dotlock.c 2009-07-06 09:24:48.000000000 +0200
> @@ -780,7 +780,7 @@
> fd = file_dotlock_open(set, path, flags, &dotlock);
> umask(old_mask);
>
> - if (fd != -1) {
> + if (fd != -1 && (uid != -1 || gid != -1)) {
> if (fchown(fd, uid, gid) < 0) {
> if (errno == EPERM && uid == (uid_t)-1) {
> i_error("%s", eperm_error_get_chgrp("fchown",
Alternatively, perhaps could you write a small c program so as to test
a fchown(fd,-1,-1) operation on a "regular" file as see whether it
fails or not.
HTH,
Axel
More information about the dovecot
mailing list