CSF shows blank page in DirectAdmin

JosKlever

Verified User
Joined
Jun 7, 2015
Messages
60
I'm installing a new server with Almalinux 10 and DirectAdmin (Standard license). I'm using OpenLitespeed as webserver.
Apparently I'm not the first (and probably not the last) one who only sees a blank page when going to the CSF page (ConfigServer Security & Firewall) and I've spent quite some time reading all the posts from the last decade and the possible solutions that were mentioned there. Without success.

Until I found a post talking about the permissions on /usr/local/directadmin/plugins/csf/exec/csf and I found out that that file didn't exist. I copied the file from another server and it was working correctly!

So the big question is: why was this file not installed in the first place? And how could this have been fixed if I didn't have another server?
 
And how could this have been fixed if I didn't have another server?
Either ask somebody else for the file or try reinstalling again with the force command or by installing CSF again manually.
The plugin is created by CSF so if a file is missing, something either went wrong with unpacking or the plugin itself is missing something.

Be aware the file is not just to be copied, but also has to have to correct permissions and owner. On my system it looks like this on all servers, mind the S in the file you mentioned.
Code:
drwxr-xr-x. 8 diradmin diradmin 4.0K 2023-12-08 00:01 ..
-rwsr-xr-x  1 root     root      18K 2025-02-28 14:01 csf
-rwxr-xr-x. 1 diradmin diradmin 8.8K 2024-09-20 12:36 da_csf.cgi
-rwxr-xr-x. 1 diradmin diradmin 8.4K 2024-09-20 12:36 da_csf_reseller.cgi
 
try reinstalling again with the force command or by installing CSF again manually
I tried with csf -uf but without success.

Copying the file (using Beyond Compare to sync it) created the correct permissions including the S. But thanks for mentioning for others having the same issue.

I've seen many replies of you in the posts I read, but hopefully we can find the root cause as well and maybe a fix.
 
I tried with csf -uf but without success.
No that is the upgrade command. I meant the custombuild force command.
I thought it was da build --force or try da build csf --force but I'm not sure that last command is working.

we can find the root cause as well and maybe a fix.
Question is if this only happened once or more often on installing CSF on a new system.

I just checked the install.directadmin.sh file of CSF and that looks correct to me:
Code:
mkdir -p /usr/local/directadmin/plugins/csf/
chmod 711 /usr/local/directadmin/plugins/csf
chown diradmin:diradmin /usr/local/directadmin/plugins/csf
cp -avf da/* /usr/local/directadmin/plugins/csf/
cp -avf csf/* /usr/local/directadmin/plugins/csf/images/
find /usr/local/directadmin/plugins/csf/ -type d -exec chmod -v 755 {} \;
find /usr/local/directadmin/plugins/csf/ -type f -exec chmod -v 644 {} \;

if [ -e "/usr/local/directadmin/plugins/csf/exec/csf" ]; then
        rm -f /usr/local/directadmin/plugins/csf/exec/csf
fi
export PATH=$PATH;
gcc -o /usr/local/directadmin/plugins/csf/exec/csf csf.c
chown -Rv diradmin:diradmin /usr/local/directadmin/plugins/csf
chmod -v 755 /usr/local/directadmin/plugins/csf/admin/index.html
chmod -v 755 /usr/local/directadmin/plugins/csf/admin/index.raw
chmod -v 755 /usr/local/directadmin/plugins/csf/exec/da_csf.cgi
chmod -v 755 /usr/local/directadmin/plugins/csf/reseller/index.html
chmod -v 755 /usr/local/directadmin/plugins/csf/reseller/index.raw
chmod -v 755 /usr/local/directadmin/plugins/csf/exec/da_csf_reseller.cgi
chmod -v 755 /usr/local/directadmin/plugins/csf/scripts/*
chown -v root:root /usr/local/directadmin/plugins/csf/exec/csf
chmod -v 4755 /usr/local/directadmin/plugins/csf/exec/csf

So this should have done the trick.
gcc -o /usr/local/directadmin/plugins/csf/exec/csf csf.c
So maybe something with compiling went wrong, or DA uses a different method to install. And then DA should have a look at the cause of the missing file.

So question is, if the file is only missing once or on every new installation.
 
My installation of CSF was done using http://files.directadmin.com/services/all/csf/csf_install.sh but if I'm correct it also calls install.directadmin.sh, and I don't see anything that should impact the csf file.
 
Back
Top