Status Checks function and emails suddenly messed up

Mac person trying his best to fake it through Ubuntu enough to keep MiaB running smoothly. I have been successful so far but about two weeks ago this started to be my email notice that there were updates to do. Status Checks in MiaB fail with “There was an error” too.
Any suggestions?

Thank you,

Missing privilege separation directory: /run/sshd
Traceback (most recent call last):
  File "management/", line 1088, in <module>
    run_and_output_changes(env, pool)
  File "management/", line 933, in run_and_output_changes
    run_checks(True, env, cur, pool)
  File "management/", line 51, in run_checks
    if not run_services_checks(env, output, pool):
  File "management/", line 91, in run_services_checks
    ret = pool.starmap(check_service, ((i, service, env) for i, service in enumerate(get_services())), chunksize=1)
  File "management/", line 34, in get_services
    { "name": "SSH Login (ssh)", "port": get_ssh_port(), "public": True, },
  File "management/", line 72, in get_ssh_port
    output = shell('check_output', ['sshd', '-T'])
  File "/home/keith/mailinabox/management/", line 123, in shell
    ret = getattr(subprocess, method)(cmd_args, **kwargs)
  File "/usr/lib/python3.6/", line 356, in check_output
  File "/usr/lib/python3.6/", line 438, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['sshd', '-T']' returned non-zero exit status 255.

What version of MiaB are you running? Is this on a hosted VPS?

Have you run system updates using sudo apt update && sudo apt upgrade?

What happens if you run sudo mailinabox?

The same thing I get when I try to install again.

Mail-in-a-Box Version: v56

Updating system packages…
Installing system packages…
Initializing system random number generator…

I can’t remember what I did the last time to get past the number generator step.

keith@mail:/var/crash$ sudo apt-get update && sudo apt-get upgrade
Hit:1 bionic InRelease
Hit:2 bionic-updates InRelease                                          
Hit:3 bionic InRelease                                      
Hit:4 bionic-backports InRelease                                                                                   
Hit:5 bionic-security InRelease                                                                                      
Hit:6 bionic InRelease         
Reading package lists... Done                      
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Holy moly, I fixed it! Thought I was silly to try but it worked.
The first line of the status check email was “Missing privilege separation directory: /run/sshd”
So I
cd /run
sudo mkdir sshd
Then the installer worked! And the admin page allowed me in. And the status checks work too.

So how do I mark this topic as “resolved” ?

Turns out that directory disappears after a restart. So I have to add it back every time.

Some googling reveals this appears to be a recurring issue: command line - SSH Server stops working after reboot, caused by missing /var/run/sshd - Ask Ubuntu Some workaround are also noted in that link.

1 Like

Thank KiekerJan.
Implementing the work arounds now to see if they solve the issue.