Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - thefantas

Pages: [1] 2 3
1
Code: [Select]
sh /scripts/cwp_security_audit

------------------------------------------------------

[INFO] Auditing cwpsrv (PID: 734540)

[OK] cwpsrv looks clean.

------------------------------------------------------

[INFO] Auditing php-fpm-cwp (PID: 736416)

[SECURITY ALERT] Unauthorized port: php-fpm

Error:Can't add notification!------------------------------------------------------

[INFO] Auditing apache (PID: 733902)

[OK] apache looks clean.

------------------------------------------------------

[DONE] Security audit finished.


1. Why does [SECURITY ALERT] Unauthorized port: php-fpm appear?
The problem is a flaw in how the script parses the text and compares the data.

Port capture: In the "Port Audit" section, the script executes an lsof command combined with awk to find out which ports are open. Due to how your Linux is configured, this command is not returning a number (like 9000), but rather returns the literal word php-fpm.

Validation: Next, the script takes that word (php-fpm) and compares it one by one against its whitelist called ALLOWED_PORTS.

The failure: If you look at the script's configuration line, ALLOWED_PORTS only contains numbers: ("2030" "2031" "2082" "2083" "2086" "2087" "2095" "2096" "9000" "2302" "2304" "8181" "8443" "80" "443"). Since the word php-fpm is obviously not equal to any of those numbers, the script assumes it is an intruder and triggers the security alert echo.

How to solve it permanently (The Patch)
Since it is a local script that you control, you can fix CWP's poor programming in five seconds.

You just have to edit this file (nano /scripts/cwp_security_audit) and include the word "php-fpm" inside the allowed ports array in the initial configuration.

Change this:


Code: [Select]
ALLOWED_PORTS=("2030" "2031" "2082" "2083" "2086" "2087" "2095" "2096" "9000" "2302" "2304" "8181" "8443" "80" "443")

For this:


Code: [Select]
ALLOWED_PORTS=("2030" "2031" "2082" "2083" "2086" "2087" "2095" "2096" "9000" "2302" "2304" "8181" "8443" "80" "443" "php-fpm")

2


It doesn't say it's in beta; in fact, they recommend AlmaLinux versions 8 and 9.
Regards.

3
Installation / Varnish does not install with cwp-el9-latest - Fixed
« on: June 03, 2026, 12:04:05 AM »
Hello, I recently installed CWP on AlmaLinux 9 (https://dl1.centos-webpanel.com/files/cwp-el9-latest) and to my surprise, when I go to WebServers_manage and select Nginx & Varnish & Apache, Varnish NEVER installs. By analyzing cwpsrv with stress-ng, I was able to detect exactly where the error is.

The strace accurately reveals why the installer was failing silently:

The panel tries to download a non-existent script (varnish.sh returns a 404 at https://dl1.centos-webpanel.com/files/s_scripts/el9/varnish.sh).

Then, it tries to apply a sed command to /etc/varnish/varnish.params. This throws an "Exit Code 2" because Varnish no longer uses that file in AlmaLinux 9.

Finally, it crashes when trying to clean /etc/varnish/conf.d/vhosts because the directory simply does not exist.

In the end, PHP generates the .vcl files, but the daemon is never actually installed or started.

The following EL8 script logic was used as a reference to build the fix: https://dl1.centos-webpanel.com/files/s_scripts/el8/varnish.sh



Code: [Select]
# 1. Install repositories and clean dependencies
dnf -y install epel-release jemalloc --enablerepo=epel
curl -s https://packagecloud.io/install/repositories/varnishcache/varnish64/script.rpm.sh | bash
dnf -y module disable varnish
dnf -y install varnish

# 2. Build the directory structure that the panel assumes exists
mkdir -p /etc/varnish/conf.d/vhosts
touch /etc/varnish/conf.d/vhosts.conf

# 3. Patch the CWP bug (The phantom file)
# We create this file to prevent the panel's internal "sed" from throwing Exit Code 2
echo "VARNISH_LISTEN_PORT=82" > /etc/varnish/varnish.params

# 4. Modify the master port at the Systemd level (The definitive way)
if [ -e "/usr/lib/systemd/system/varnish.service" ]; then
    sed -i "s|6081|82|g" /usr/lib/systemd/system/varnish.service
    systemctl daemon-reload
fi

# 5. Force PHP to regenerate the vHosts with the repaired structure
sh /scripts/cwpsrv_rebuild_user_conf

# 6. Bring up the proxy chain in order
systemctl enable --now varnish
systemctl restart httpd
systemctl restart varnish
systemctl restart nginx

I hope they update WebServers_manage

4
Problems on other RedHat linux servers / Re: Almalinux: User Quota
« on: December 20, 2022, 08:33:46 PM »
i have the same problem.

5
MySQL / Database create without prefix "_test"
« on: November 27, 2022, 10:54:11 AM »
Hi, when I create a database from :2083 it does not reflect it in the same panel, but it is created in mysql BUT without the prefix, when I add a database manually with user prefix it does reflect in the panel, any hint? if only I could see the code!
Regards

6
Apache / Re: Apache Compiler
« on: October 19, 2022, 08:03:57 PM »
When can we expect to see 2.4.54 available for compilation?  2.4.54 was released 2 months ago on 2022-06-08
+1

7
How to / Re: CWP Load Balanced
« on: April 29, 2022, 10:10:59 PM »
Maybe they can use the API and a python or php script to synchronize the accounts.

8
PHP Selector / Re: php 7.4 with pear
« on: August 23, 2020, 11:36:18 AM »
Hi, what you need to do is click on "Reset options", then configure and manually add what you need, including pear.
Then you compile and you're done :). Greetings.

*Hopefully they will add the option pear in the other section "select".

Quote
[config-path]
default=1
required=1
option="--prefix=/opt/alt/php-fpm74/usr --with-config-file-path=/opt/alt/php-fpm74/usr/php"
info-file=config-path.txt
pre-script="php74.sh"

[config-scan]
default=1
required=1
option="--with-config-file-scan-dir=/opt/alt/php-fpm74/usr/php/php.d"
info-file=config-scan.txt

[zlib]
default=1
option="--with-zlib=/usr"
info-file=zlib.txt
include=zlib-dir

[mbstring]
default=1
option="--enable-mbstring"
info-file=mbstring.txt

[zip]
default=1
option="--with-zip"
info-file=zip.txt

[bcmath]
default=1
option="--enable-bcmath"
info-file=bcmath.txt

[pcntl]
default=1
option="--enable-pcntl"
info-file=pcntl.txt

[ftp]
default=1
option="--enable-ftp"
info-file=ftp.txt

[exif]
default=1
required=1
option="--enable-exif"
info-file=exif.txt

[calendar]
default=1
option="--enable-calendar"
info-file=calendar.txt

[sysvmsg]
default=1
required=1
option="--enable-sysvmsg"
info-file=sysvmsg.txt

[sysvsem]
default=1
required=1
option="--enable-sysvsem"
info-file=sysvsem.txt

[sysvshm]
default=1
required=1
option="--enable-sysvshm"
info-file=sysvshm.txt

[tidy]
default=1
option="--with-tidy"
info-file=tidy.txt

[curl]
default=1
required=1
option="--with-curl"
info-file=curl.txt

[mcrypt]
default=1
script="mcrypt.sh"
info-file=mcrypt.txt

[iconv]
default=1
option="--with-iconv"
info-file=iconv.txt

[gmp]
default=1
option="--with-gmp"
info-file=gmp.txt

[pspell]
default=1
option="--with-pspell"
info-file=pspell.txt

[gd]
default=1
option="--enable-gd"
info-file=gd.txt

[gd-jpeg]
default=1
option="--with-jpeg"
info-file=gd.txt

[gd-freetype]
default=1
option="--with-freetype"
info-file=gd.txt

[gd-jis-conv]
default=1
option="--enable-gd-jis-conv"
info-file=gd.txt

[gd-webp]
default=1
option="--with-webp"
info-file=gdwebp.txt

[zlib-dir]
default=1
option="--with-zlib-dir=/usr"
info-file=no.txt

[xpm-dir]
default=1
option="--with-xpm"
info-file=no.txt

[openssl]
default=1
option="--with-openssl"
info-file=openssl.txt

[pdo-mysql]
default=1
option="--with-pdo-mysql=mysqlnd"
info-file=pdo-mysql.txt

[gettext]
default=1
option="--with-gettext=/usr"
info-file=gettext.txt

[bz2]
default=1
option="--with-bz2=/usr"
info-file=bz2.txt

[mysqli]
default=1
option="--with-mysqli"
info-file=mysqli.txt

[soap]
default=1
option="--enable-soap"
info-file=soap.txt

[phar]
default=1
option="--enable-phar"
info-file=phar.txt

[xsl]
default=1
option="--with-xsl"
info-file=xsl.txt

[xmlrpc]
default=1
option="--with-xmlrpc"
info-file=xmlrpc.txt

[kerberos]
default=1
option="--with-kerberos"
info-file=kerberos.txt

[posix]
default=1
option="--enable-posix"
info-file=posix.txt

[sockets]
default=1
option="--enable-sockets"
info-file=sockets.txt

[pcre]
default=1
option="--with-external-pcre"
info-file=pcre.txt

[calendar]
default=1
option="--enable-calendar"
info-file=calendar.txt

[libdir]
default=1
required=1
option="--with-libdir=lib64"
info-file=libdir.txt

[mysql-sock]
default=1
required=1
option="--with-mysql-sock=/var/lib/mysql/mysql.sock"
info-file=mysql-sock.txt

[shmop]
default=1
option="--enable-shmop"
info-file=shmop.txt

[intl]
default=1
option="--enable-intl"
info-file=intl.txt

[imap]
default=0
option="--with-imap --with-imap-ssl"
info-file=imap.txt

[imagick]
default=1
script="imagick.sh"
info-file=imagick.txt

[memcached]
default=1
script="memcached.sh"
info-file=memcached.txt

[memcache]
default=0
script="memcache.sh"
info-file=memcache7.txt

[redis]
default=0
script="redis.sh"
info-file=redis.txt

[pgsql]
default=0
option="--with-pgsql=/usr/lib64/pgsql"
info-file=pgsql.txt

[pdo-pgsql]
default=0
option="--with-pdo-pgsql"
info-file=pdo-pgsql.txt

[mongodb]
default=0
script="mongodb.sh"
info-file=mongodb.txt

[uploadprogress]
default=1
script="uploadprogress.sh"
info-file=uploadprogress.txt

[ldap]
default=1
option="--with-ldap=/usr --with-ldap-sasl=/usr"
info-file=ldap.txt
pre-script="ldap.sh"

[ioncube]
default=1
script="ioncube.sh"
info-file=ioncube.txt

[sourceguardian]
default=1
script="sourceguardian.sh"
info-file=sourceguardian.txt

[pdo_firebird]
default=0
option="--with-pdo-firebird"
info-file=PDO_FIREBIRD.txt
pre-script="firebird.sh"

[mailparse]
default=1
script="mailparse.sh"
info-file=mailparse.txt

[ssh2]
default=1
script="ssh2.sh"
info-file=ssh2.txt

[fpm]
default=1
required=1
option="--enable-fpm"
info-file=fpm.txt

[zend-opcache]
default=1
option="--enable-opcache"
script="opcache.sh"
info-file=opcache.txt

[apcu]
default=1
script="apcu.sh"
info-file=apcu.txt

[sqlsrv]
default=1
script="sqlsrv.sh"
info-file=sqlsrv.txt

[xdebug]
default=1
script="xdebug.sh"
info-file=xdebug.txt

[sodium]
default=1
script="sodium.sh"
info-file=sodium.txt

[pear]
default=1
option="--with-pear"
info-file=pear.txt

9
PHP Selector / Re: php 7.4 with pear
« on: August 23, 2020, 10:23:02 AM »
Code: [Select]
[pear]
default=1
option="--with-pear"
info-file=pear.txt
try..

Code: [Select]
/bin/sh./configure--prefix=/opt/alt/php-fpm74/usr--with-config-file-path=/opt/alt/php-fpm74/usr/php--with-config-file-scan-dir=/opt/alt/php-fpm74/usr/php/php.d--with-zlib=/usr--enable-mbstring--with-zip--enable-bcmath--enable-pcntl--enable-ftp--enable-exif--enable-calendar--enable-sysvmsg--enable-sysvsem--enable-sysvshm--with-tidy--with-curl--with-iconv--with-gmp--with-pspell--enable-gd--with-jpeg--with-freetype--enable-gd-jis-conv--with-webp--with-zlib-dir=/usr--with-xpm--with-openssl--with-pdo-mysql=mysqlnd--with-gettext=/usr--with-bz2=/usr--with-mysqli--enable-soap--enable-phar--with-xsl--with-xmlrpc--with-kerberos--enable-posix--enable-sockets--with-external-pcre[b]--with-pear[/b]--with-libdir=lib64--with-mysql-sock=/var/lib/mysql/mysql.sock--enable-shmop--enable-intl--with-ldap=/usr--with-ldap-sasl=/usr--enable-fpm--enable-opcache

10
I have the same problem, I have reinstalled the module but I still have the same problem.

https://srv.ok.td:2083/cwp_x1fee23dxc7xbx5x/userkkc/?module=softaculous

Could not write SESSION DATA.

CWPpro version: 0.9.8.926

***************************************************
Problem solved by changing the owner of the folder

chmod 0711 /home/username/.softaculous 
chown username:username /home/username/.softaculous

11
CentOS-WebPanel GUI / Re: List Accounts not showing the accounts list
« on: December 15, 2019, 10:24:20 AM »
Answer me:
https://srv.xxx:2083/cwp_123456789/user/user/index.php?module=email_accounts&acc=pipe&op=list

Quote
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">....

But a new, well-functioning CWP responds:

Quote
{"sEcho":0,"iTotalRecords":0,"iTotalDisplayRecords":25,"aaData":[]}

It seems that the session is rejected, you should review it :).

Greetings

12
CentOS-WebPanel GUI / Re: List Accounts not showing the accounts list
« on: December 15, 2019, 09:53:48 AM »

I also have that problem, it doesn't show me the users, (I have the latest PRO version) but with that message.

DataTables warning: table id=dataTables-examplemail - Invalid JSON response. For more information about this error, please see http://datatables.net/tn/1

13
1+

14
CentOS-WebPanel Bugs / Re: Error When try to List Accounts
« on: December 07, 2019, 12:27:42 PM »
I have the same problem but on the mailing list, can someone help us?

15
Where's the module you say? I have the same version and I can't find it.

Pages: [1] 2 3