大网数据广告活动
服务器运维问答

What are the correct dovecot file permissions for /etc/dovecot on Ubuntu 18.04?

· 52CE 我爱测

I can't log in to my newly self-hosted webmail and I'm getting the following entries in /var/log/mail.log Feb 10 02:00:31 ip-172-26-15-53 dovecot: lmtp([email omitted]): Error: open( /etc/dovecot/sieve/before.d/no-spam.svbin.ip-1…

问题原文

原帖链接 · codecowboy · CC BY-SA 4.0

I can't log in to my newly self-hosted webmail and I'm getting the following entries in /var/log/mail.log

Feb 10 02:00:31 ip-172-26-15-53 dovecot: lmtp([email omitted]): Error: open(
/etc/dovecot/sieve/before.d/no-spam.svbin.ip-172-26-15-53.31363.94959b0f9050164f) failed: R
ead-only file system
Feb 10 02:00:31 ip-172-26-15-53 dovecot: lmtp([email omitted]): Error: wEGGI
j+5QF6DegAAAPOhIQ: sieve: binary save: failed to create temporary file: open(/etc/dovecot/s
ieve/before.d/no-spam.svbin.) failed: Read-only file system

It looks to be a permissions problem. I've tried the suggestions here

My install is at /etc/dovecot and permissions are

-rwxrwx---   1 vmail dovecot 

Dovecot was installed on Ubuntu 18.04 (Amazon lightsail) using the following playbook:

https://github.com/codecowboy/sovereign/blob/master/roles/mailserver/tasks/dovecot.yml

Dovecot version is 2.2.33.2 (d6601f4ec)

Mailbox is stored on an encfs volume

已采纳解答

原帖链接 · tilkov · CC BY-SA 4.0

The systemd unit, which controls dovecot has ProtectSystem set to full or strict, which prevents the processes from writing to /etc.

Add to the unit file /etc/systemd/system/multi-user.target.wants/dovecot.service an exception for this directory:

ReadWritePaths=/etc/dovecot/sieve/before.d/

Reload the units with:

systemctl daemon-reload

And restart dovecot with:

systemctl restart dovecot

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2020-02-10)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。