Subdirectories in /var/log/delivery ended with wrong ownership

Issue #1030 closed
Pim van Riezen created an issue

The SMTP component of poste.io stopped accepting inbound mail with no clear reason. The underlying reason seems to be that some of the date-specific files in /var/log/delivery inside the container spontaneously changed ownership to root:

root@673d434ff666:/data/log/s6/haraka-smtp# ls -l /var/log/delivery/
total 1900
-rw-r--r-- 1 root root 142033 Dec 28 00:58 2023-12-27-total
-rw-r--r-- 1 root root 30576 Dec 29 00:19 2023-12-28-total
-rw-r--r-- 1 root root 24704 Dec 30 00:18 2023-12-29-total
-rw-r--r-- 1 root root 19427 Dec 31 00:59 2023-12-30-total
-rw-r--r-- 1 root root 18682 Jan 1 00:47 2023-12-31-total
-rw-r--r-- 1 root root 19516 Jan 2 00:43 2024-01-01-total
-rw-r--r-- 1 root root 19385 Jan 3 00:45 2024-01-02-total
-rw-r--r-- 1 root root 25020 Jan 4 00:35 2024-01-03-total
-rw-r--r-- 1 root root 21135 Jan 5 00:31 2024-01-04-total
-rw-r--r-- 1 root root 28396 Jan 6 00:50 2024-01-05-total
-rw-r--r-- 1 root root 23884 Jan 7 00:40 2024-01-06-total
-rw-r--r-- 1 root root 20387 Jan 8 00:52 2024-01-07-total
-rw-r--r-- 1 root root 30255 Jan 9 00:39 2024-01-08-total
-rw-r--r-- 1 root root 29572 Jan 10 00:48 2024-01-09-total
-rw-r--r-- 1 root root 32599 Jan 11 00:48 2024-01-10-total
-rw-r--r-- 1 root root 41851 Jan 12 00:48 2024-01-11-total
-rw-r--r-- 1 root root 44113 Jan 12 22:54 2024-01-12-total
-rw-r--r-- 1 delivery mail 12496 Jan 13 23:20 2024-01-13-total
-rw-r--r-- 1 delivery mail 25365 Jan 15 01:00 2024-01-14-total
-rw-r--r-- 1 root root 143275 Jan 16 00:59 2024-01-15-total
-rw-r--r-- 1 root root 114424 Jan 17 00:58 2024-01-16-total
-rw-r--r-- 1 root root 125747 Jan 18 00:55 2024-01-17-total
-rw-r--r-- 1 root root 104317 Jan 19 00:58 2024-01-18-total
-rw-r--r-- 1 root root 164237 Jan 20 00:56 2024-01-19-total
-rw-r--r-- 1 root root 152465 Jan 21 00:44 2024-01-20-total
-rw-r--r-- 1 root root 62505 Jan 22 00:52 2024-01-21-total
-rw-r--r-- 1 root root 36518 Jan 22 14:08 2024-01-22-total
-rw-r--r-- 1 delivery mail 51720 Jan 24 00:58 2024-01-23-total
-rw-r--r-- 1 delivery mail 94560 Jan 25 00:52 2024-01-24-total
-rw-r--r-- 1 delivery mail 84241 Jan 26 00:50 2024-01-25-total
-rw-r--r-- 1 delivery mail 8415 Jan 26 12:36 2024-01-26-total
drwxr-xr-x 18 delivery mail 4096 Jan 6 2023 conn
drwxr-xr-x 18 delivery mail 4096 Jan 9 2023 del
drwxr-xr-x 18 delivery mail 4096 Jan 8 2023 tx

After changing ownership of all files to delivery:mail, the smtp server started working again. But these ownership changes were not instigated by me, nor was it apparent from the web ui that there was a problem.

Comments (3)

  1. SH repo owner

    Please try the latest one (released today). There is an awful NodeJS bug that corrupts the delivery directory with files owned by root that are not available to the mail:mail process.

    Older files can be fixed with chown 88:8 /data/log/delivery -R

  2. Log in to comment