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

15 posts / 0 new
Last post
#1 Wed, 10/26/2011 - 19:09

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


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!

Wed, 10/26/2011 - 22:06

Hmm, you may have run into a bug...

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


Sat, 10/29/2011 - 15:18

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.

Mon, 10/31/2011 - 09:03

Yeah, those permissions should be okay.

What do you see if you run this command:

ls -la /etc/dovecot/

Mon, 10/31/2011 - 14:33 (Reply to #4)

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 ..

Fri, 11/04/2011 - 08:16 (Reply to #5)

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?

Fri, 11/04/2011 - 09:10

Hrm, I'm a bit stumped as to what might cause that... how about this, what does the command "mount" show on your system?


Fri, 11/04/2011 - 10:43

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 ;)

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.

Fri, 11/04/2011 - 11:34
/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.

Fri, 11/04/2011 - 11:51

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...


Fri, 11/04/2011 - 12:04

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

Fri, 11/04/2011 - 16:10

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

Sat, 11/05/2011 - 09:29

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.


Sat, 11/05/2011 - 11:07

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!

Fri, 11/25/2011 - 14:18

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

Topic locked