1

Topic: Dovecot Error: open(......) failed: Read-only file system

==== Required information ====
- iRedMail version (check /etc/iredmail-release):  0.9.6 MARIADB edition.
- Linux/BSD distribution name and version: Centos 7 (centos-release-7-4.1708.el7.centos.x86_64)
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): Maria DB
- Web server (Apache or Nginx): Apache
- Manage mail accounts with iRedAdmin-Pro?: NO
- Selinux: Disabled

- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.

on dovecot-imap.log:

imap(postmaster@domain.com): Error: open() failed with file /home/vmail/vmail1/domain.com/p/o/s/postmaster//Maildir/.Drafts/dovecot.index.log: Read-only file system
(same error on different files)

On roundcube:

Error de servidor: STATUS: Internal error occurred. Refer to server log for more information. [2017-09-14 17:16:10] (0.002 + 0.000 + 0.001 secs).

====

I've read through the forum and tried several solutions:

1.- Permission set recursive to 0700 on /home/vmail (checked and done)
2.- file and folder ownership set recursive to vmail:vmail on /home/vmail (checked and done)
3.- Set mail_debug=yes on dovecot.conf and the dovecot.log file did not say anything worth saying, except for: acl vfile: file /home/vmail/vmail1/domain.com/p/o/s/postmaster//Maildir/.Drafts/dovecot-acl not found


Also tried to set permissions to 7777 and nothing happend.

Please help

Regards,

Agustin

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Dovecot Error: open(......) failed: Read-only file system

*) Is disk space full?
*) Is /var/vmail mounted on a remote/network file system? Is it mounted with correct mount option (e.g. 'rw' for read-write permission)?

3

Re: Dovecot Error: open(......) failed: Read-only file system

1.- Disk es not full, only used 30% of 777gb
2.- The mount point is /home/vmail (not network), it does have rw permisions

4

Re: Dovecot Error: open(......) failed: Read-only file system

No idea, you have to check other log files to figure it out. Cannot help with given info.

5

Re: Dovecot Error: open(......) failed: Read-only file system

Sorry it was my fault, I did not give all the info.

The problem started when I updated (yum update) to centos 7.4 and all it's packages.

Since I could not make it work, I've reinstalled the hole system from scratch with the latest Centos image (1708) and make a clean installation of iRedmail, the surprise was that the same error occur.

I only had one difference from the default values of iRedMail installation, the storage directory is not the default one (var/vmail) its /home/vmail. So something was blocking it.

I did same heavy digging and testing and I found the solution. The systemd was setting /home to read-only for dovecot

so the solution was editing "/usr/lib/systemd/system/dovecot.service"
and add:

[Service]
.....
ProtectSystem=false
ProtectHome=false (not necessary but just in case, i've tested with out it and it worked)

reboot the service and problem solved.

Mark it closed

6

Re: Dovecot Error: open(......) failed: Read-only file system

I will test this tomorrow and fix it in iRedMail directly if it's a systemd related issue.

7

Re: Dovecot Error: open(......) failed: Read-only file system

Tested with CentOS 7 and iRedMail-0.9.7, i cannot reproduce this issue.

8 (edited by dmikael 2017-10-03 06:37:34)

Re: Dovecot Error: open(......) failed: Read-only file system

Hi,

I confirm the same error with same scenario.
A system update was done on CentOS Linux release 7.4.1708 (Core)
My iRedMail version is 0.9.7 PGSQL edition.

ProtectHome doesn't help, only ProtectSystem=false as @lopezmen suggested.
Thanks man a lot, you saved me from setting up a new server from scratch.

Both of us are not guru's in systemd, I think so.
But the case is worth investigation as more issues from users may come.

What I noticed is that dovecot was updated from

dovecot-2.2.28-1.el7.centos.x86_64
dovecot-pigeonhole-2.2.28-1.el7.centos.x86_64
dovecot-mysql-2.2.28-1.el7.centos.x86_64
dovecot-pgsql-2.2.28-1.el7.centos.x86_64

to

dovecot-2.2.32-2.el7.centos.x86_64
dovecot-pigeonhole-2.2.32-2.el7.centos.x86_64
dovecot-pgsql-2.2.32-2.el7.centos.x86_64
dovecot-mysql-2.2.32-2.el7.centos.x86_64

systemd was also upgraded

centos-release-7-4.1708.el7.centos.x86_64
systemd-libs-219-42.el7_4.1.x86_64
systemd-219-42.el7_4.1.x86_64
systemd-sysv-219-42.el7_4.1.x86_64
initscripts-9.49.39-1.el7.x86_64
kernel-3.10.0-693.2.2.el7.x86_64

Considering the fact that @lopezmen did it from scratch with the same result, there is something with new version of systemd.

9

Re: Dovecot Error: open(......) failed: Read-only file system

Lopezmen,
Thanks man, you saved my Day

i had the same error with same scenario.

ProtectSystem=false  did it for me.


saved me from doing a complete re-install

Thanks