all_pre.sh causes "r.DOMAIN_LIST is undefined" error

warg

Verified User
Joined
Nov 30, 2020
Messages
183
Hello,

I followed this guide and created a /usr/local/directadmin/scripts/custom/all_pre.sh file and copy and pasted this content:

#!/bin/sh
if [ "$command" = "/CMD_API_ACCOUNT_ADMIN" ]; then
echo "Cannot use this command";
exit 1;
fi
if [ "$command" = "/CMD_ACCOUNT_ADMIN" ]; then
echo "Cannot use this command";
exit 1;
fi
exit 0;
and made it executable as stated in the guide:

chmod 000 /usr/local/directadmin/scripts/custom/all_pre.sh

When I save the file (with or without content), I get a broken DirectAdmin admin panel:

Error​


r.DOMAIN_LIST is undefined

This error is thrown on any page and the whole panel is inaccessible while this specific file exists. Emptying the file doesn't work. I have to delete it to get a properly working panel again. Am I doing something wrong here? This happens on Debian 10 and latest DirectAdmin version (non-recent pre-releases were installed but I don't know if this is related to a bug in them).

Thank you for your help!

Best Regards,
 
I think the chmod 000 command is causing the issue. Maybe this file must not be only readable by root user. If I create the file and just make it executable with chmod +x, I get no error and the command is properly denied in the admin panel.
 
Back
Top