How to install busybox

BusyBox combines tiny versions of many common UNIX utilities into a single small executable.

This may help you when you got your shell broken since busybox in independent binary which includes a lot of commands inside.… Read the rest

How to fix WordPress Media error Unable to create directory uploads..

You may face something like the following upon uploading an image using your WordPress –> Media section

Error:

“foto-0012.jpg” has failed to upload.
Unable to create directory uploads/2022/02. Is its parent directory writable by the server?

Fix 1:

Double check you have files/folders permissions 644/755 accordingly

find .
Read the rest

How to fix RvSiteBuilder 6 “current directory is not permitted” error

Error:

Problem Reported: Problem with publishing
Error Message: Error function of publish task :makeFolders cannot create directory. current directory is not permitted./home/olduser

Mostly this problem occur after recent master domain or cPanel username change, so to get this fixed you need to try to correct diskquota.ini.phpRead the rest

How to rebuild vc_list_store file

Recently I faced that vc_list_store is missed for just restored account as result a client got their Git repositories empty

I have found that .cpanel/datastore in Jetbackup exclude list, it seems because they skip .cpanel/datastore by default at their doc page:

https://docs.jetbackup.com/manual/whm/BackupJobs/excludeFiles.htmlRead the rest

How to check if JSON_ARRAYAGG supported

Run the following simple query

with t1 as ( select 0 as a ) select version(), JSON_ARRAYAGG(a) as j from t1 where a > 0;

Example:

MariaDB [(none)]> with t1 as ( select 0 as a ) select version(), JSON_ARRAYAGG(a) as j from t1 where a > 0;
+-----------------+------+
| version() | j |
+-----------------+------+
| 10.5.13-MariaDB | NULL |
+-----------------+------+
1 row in set (0.002 sec)

If it doesn’t support you should get:

MariaDB [(none)]> with t1 as ( select 0 as a ) select version(), JSON_ARRAYAGG(a) as j from t1 where a > 0;
ERROR 1305 (42000): FUNCTION JSON_ARRAYAGG does not exist

 

Source: https://mariadb.com/kb/en/json_arrayagg/… Read the rest

How to access protect folder by apache HTTP Basic Authentication using cURL

Normally if you try to access protect folder by Basic Authentication without proper credentials you will get 401 Unauthorized error:

Example:

curl -s https://yourwebserver.com/mysecure

<!DOCTYPE HTML PUBLIC “-//IETF//DTD HTML 2.0//EN”>
<html><head>
<title>401 Unauthorized</title>
</head><body>
<h1>Unauthorized</h1>
<p>This server could not verify that you
are authorized to access the document
requested.

Read the rest

How to protect a web folder using HTTP Basic Authentication with Apache2

Run the following to create a password file and enter your password

htpasswd -c /etc/httpd/passwd/myverysecrepasswords admin

-c flag means create a new file

Edit the following accordingly your needs and append into your httpd.conf file

<Directory "/var/www/html/mysecure">
AuthType Basic
AuthName "Protected Files"
AuthBasicProvider file
AuthUserFile /etc/httpd/passwd/myverysecrepasswords
Require user admin
</Directory>

 

Common paths where httpd.confRead the rest

How to install telnet on MacOS

If you don’t have Homebrew then go ahead and install it:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Then install telnet:

brew install telnet

Example of usage:

telnet google.com 80

Output:

Trying 142.250.180.238…
Connected to google.com.
Escape character is ‘^]’.

Instead of telnet you can use nc (netcat)command

Example:

nc -v google.com
Read the rest

How to get rid of SpamAssassin URIBL_BLOCKED Administrator notice

Symptom, In messages body you permanently getting the following:

0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked.
See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for information.

You need to either stop using free DNS resolvers, for example like:

root@server1 [~]# cat /etc/resolv.conf
nameserver 8.8.8.8
nameserver 1.1.1.1

Or update your SpamAssassin configuration as the following:

echo "dns_server 127.0.0.1 # added to fix blocking of URIBL and DNSWL queries" >> /etc/mail/spamassassin/local.cf
Read the rest