@Everyone,
I will give a small summary of all relevant topics (and issues) that are existing with ASL (Atomic Secured Linux), in order to provide the much needed clarity.
I will provide two sections, one of them dedicated to a general explanation, the other dedicated to the solution of the issues encountered.
A - Explanation
In essence, ASL is a full package consisting of the (stand-alone) AUM installer and a Web GUI (on port 30000).
Plesk only has the (stand-alone) AUM installer: there is no binary or script called "asl" on Plesk instances, implying (amongst others) that
a) Atomicorp`s installation, upgrade and debugging manuals are not that helpful, since they all assume the existence of "asl", (and)
b) the topic thread
https://talk.plesk.com/threads/error-asl-has-not-been-configured.338188/#post-806027 is not useful at all, (and)
c) the KB article KB122577 does not apply in the current case,
and, more important,
d) the script "asl_cli_c" is NOT the same as the binary or script "asl", (and)
e) cronjobs using the /etc/asl/config file AND referring to "asl" will exit with code 127, (and)
f) cronjobs using the /etc/asl/config file with a key-value pair of CONFIGURED="yes" will exit with code 1,
and, therefore, the MOST important part is that
- mod_security and/or the wep application firewall (WAF)
never stopped working (it worked fine!),
- the error notifications per mail resulted from cronjobs with exit codes 127 can be
safely ignored (a solution exists, but the fact remains that these notifications are barely relevant).
In essence, there is or was a big issue with the config file, which
was completely empty.
In the meantime, the KB article
KB129494 has been issued, but that still does not resolve all issues.
Let´s proceed with the second section, being the resolution of issues encountered.
B - Solutions
a) Exit code 1
ISSUE: error notifications with respect to cronjobs exiting with code 1.
SOLUTION 1: follow KB article
KB129494, but I would not want to recommend it, for reasons that will become clear later.
SOLUTION 2: follow the steps below (in chronological order):
- run the command:
cp -p /etc/asl/config.dpkg-dist /etc/asl/config
- run the command:
/var/asl/bin/aum -c
and note that you should have the config.dpkg-dist file (on deb based machines, or the equivalent on rpm based machines), otherwise just use solution 1.
CHECK: verify that /etc/asl/config contains the key-value pair of CONFIGURED="yes" in the last line of the config file.
IMPORTANT: you are not finished yet, have a look at point b!
b) Exit code 127
ISSUE: error notifications with respect to cronjobs exiting with code 127.
SOLUTION: change the key-value pair APACHE_RESTART_COMMAND="/etc/init.d/httpd restart" to APACHE_RESTART_COMMAND="/etc/init.d/apache2 restart", IF AND ONLY IF you are on a deb based machine (like Ubuntu).
CHECK: just have a look at /etc/init.d, in order to determine whether you should use "httpd" or "apache2".
IMPORTANT: in most cases of changes to or updates to mod_security and/or rulesets, Apache web server has to be restarted
IMPORTANT: do NOT use the "work-around" as mentioned in the post
https://talk.plesk.com/threads/suddenly-getting-asl-errors-today.338907/page-2#post-806008
IMPORTANT: it is highly recommend to use the key-value pair RESTART_APACHE="graceful" (!)
NOTE: it is recommended to restart httpd or apache2 service after applying this solution.
c) Various issues
The config file /etc/asl/config is rather extensive AND "buggy" AND/OR "inconvenient", the latter in the sense that it is created from a template.
The problem with the template is that some inconveniences can occur when running "aum -c": it will set the key-value pair of CONFIGURED="yes", but it will also
undo the change to the key-value pair to APACHE_RESTART_COMMAND="/etc/init.d/apache2 restart" AND all other (manual or custom) changes to the /etc/asl/config file.
Moreover, not all values for specific keys are appropriate, optimal or even correct.
In essence, this is a (major) "task to do" for Atomicorp, in cooperation with Plesk Team.
In short, I hope that the above mentioned summary and explanation will help a bit.
Regards!