Failed to open /etc/dovecot/dovecot.conf /etc/dovecot.cert.pem for writing : Bad file descriptor

Hello!

I was trying to copy the SSL certificate to dovecot and postfix, but when I tried to copy to dovecot, I got the following error:

“Failed to open /etc/dovecot/dovecot.conf /etc/dovecot.cert.pem for writing : Bad file descriptor”

When I looked, I’m thinking it is because /etc/dovecot doesn’t exist. All that is in there is /etc/dovecot.conf.

My system is Centos 5.5 - and I did a fresh install and setup of Virtualmin. By the way, I love it. Thanks so much for the hard work!

Hmm, you may have run into a bug…

If you create a directory “/etc/dovecot”, does it work at that point?

-Eric

I created /etc/dovecot and by default the permissions were 755. I still get:

Failed to open /etc/dovecot/dovecot.conf /etc/dovecot.cert.pem for writing : Bad file descriptor

Thanks again.

Yeah, those permissions should be okay.

What do you see if you run this command:

ls -la /etc/dovecot/

The output is:

total 8
drwxr-xr-x 2 root root 4096 Oct 30 02:06 .
drwxr-xr-x 61 root root 4096 Oct 31 23:14 …

hi there

i have the same issue with a clean install of 3.88 gpl script on a fresh 5.7 CentOS

someone an idea?

Hrm, I’m a bit stumped as to what might cause that… how about this, what does the command “mount” show on your system?

-Eric

the output of mount is:

/dev/simfs on / type simfs (rw,relatime,usrquota,grpquota) proc on /proc type proc (rw,relatime) sysfs on /sys type sysfs (rw,relatime) non on /dev/pts type devpts (rw,relatime) none on /proc/sys/fs/binfmt_mixc type binfmt_misc (rw,relatime)

Hopefully that is correct, I’m using putty here at work, and I just typed the output here. I don’t know how to copy and paste yet :wink:

I thought I would add that the version of Virtualmin I am using is 3.88 GPL as well. I ran some updates, and Centos is now 5.7, but when I installed and encountered the issue it was 5.5. It is a VPS, so maybe there was some modifications done to the CentOS image. Hopefully this helps.

/dev/vzfs on / type reiserfs (rw,usrquota,grpquota) proc on /proc type proc (rw,relatime) sysfs on /sys type sysfs (rw,relatime) none on /dev type tmpfs (rw,relatime) devpts on /dev/pts type devpts (rw,relatime) none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,relatime)

it is also a VPS here the OS was a 5.4 but i updated it to 5.7 before i ran the script.

Hmm, what output do you receive if you run this command:

find /etc -name dovecot.conf

I wonder if that config file is in a non-standard location…

-Eric

well i found it allready there (/etc/dovecot.conf) and was suprised to see that virtualmin was searching it in /etc/dovecot/.

I found it as well in the same location: /etc/dovecot.conf

Okay, if you go into Webmin -> Servers -> Dovecot -> Module Config, try changing the path to the Dovecot config file to be just /etc/dovecot.conf – that may resolve the issues you’re seeing.

-Eric

That worked for me. When I went to the module config for Dovecot, the entry I saw was:

/etc/dovecot/dovecot.conf /etc/dovecot.conf

I just removed the first, and left it as /etc/dovecot.conf - then it copied just fine. Thank you for your help, and for Virtualmin as a whole!

Mine worked the same as fullproofed; looks like the double entries for dovecot.conf don’t work and have to be changed to /etc/dovecot.conf

CentOS 5.6 | Virtualmin 3.88 | Postfix 2.3.3 | PHP 5.2.17 | Apache 2.2.3 | MySQL 5.0.77