Missing privilege separation directory: /run/sshd
ltcptgeneral opened this issue · comments
My deployment of mailinabox regularly throws this error in the "Status Checks Change Notice":
Missing privilege separation directory: /run/sshd
Traceback (most recent call last):
File "management/status_checks.py", line 1100, in <module>
run_and_output_changes(env, pool)
File "management/status_checks.py", line 945, in run_and_output_changes
run_checks(True, env, cur, pool)
File "management/status_checks.py", line 51, in run_checks
if not run_services_checks(env, output, pool):
File "management/status_checks.py", 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/status_checks.py", line 34, in get_services
{ "name": "SSH Login (ssh)", "port": get_ssh_port(), "public": True, },
File "management/status_checks.py", line 72, in get_ssh_port
output = shell('check_output', ['sshd', '-T'])
File "/root/mailinabox/management/utils.py", line 123, in shell
ret = getattr(subprocess, method)(cmd_args, **kwargs)
File "/usr/lib/python3.6/subprocess.py", line 356, in check_output
**kwargs).stdout
File "/usr/lib/python3.6/subprocess.py", line 438, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['sshd', '-T']' returned non-zero exit status 255.
Also, the System Status Checks page in the admin tool throws the error: Something went wrong, sorry.
I have tried to create this folder in the /run/ directory, and added a startup command in /etc/rc.local, but did not solve the issue.
Running Ubuntu 18.04 LXC container, everything else about the mail server functions properly.
Running as an LXC container is not supported.
There should be no reason the application runs any differently in a system container vs a virtual machine
restarting the ssh service using: service ssh start
has resolved the second issue
will update to see if the first issue is also resolved (i suspect it has)
The first issue has been solved, however, it seems that automating the start of the sshd service is a little buggy