System recording fails

When I want to play or save a fresh recorded message, FreePBX can not connect with Asterisk.
The fault is caused by /var/www/html/admin/libraries/media/Media/Driver/Drivers/AsteriskShell.php which can not find the lock file in /var/run/asterisk/asterisk.ctl.
Which is correct because Asterisk writes his lock file in /run/asterisk/asterisk.ctl

This is also the case when I try to listen to a recorded call trough the CDR.

Is this a bug?

Not a bug

Asterisk is looking for the lock file and can’t find it. Asteriskshell.php executes asterisk itself which throws the error about the lock file. There is nothing wrong in asteriskshell.php

This means your asterisk is not properly configured. You should try out the distro.

I solved it by checking the permissions on the lock file (and directory).

BTW: also a life-saver when you struggle with starting Asterisk;

asterisk -rx “core stop now” ; fwconsole stop && fwconsole chown && fwconsole start