Category: Uncategorized

GRANT read only access to a PostgreSQL database for a user

In your terminal, login as the postgres user (for security reasons, the postgres user has no password. That’s why we are logging in using -i option) Connect to the PostgreSQL interactive terminal. Notice that you should mention the name of the concerned database, otherwise you will be doing operations on the postgres default database instead. Allow the user to connect to

Read more

Command to know TLS Version:

For TLS 1.3: For TLS 1.2: For TLS 1.1: For TLS 1: If you get the certificate chain and the handshake then the TLS version is supported. If you don’t see the certificate chain, and something similar to “handshake error” then its not.

Read more

MySQL Error “Too many connections” and how to resolve it

The maximum number of connections threads allowed for the server is contained in the system variable max_connections. The default value is 151. To see the value to which this variable is set, run the following SQL command: To change the value of the system variable max_connections, the –max_connections option can be used. To change this variable temporarily while

Read more

Useful Exim Commands

exigrep domain.com /var/log/exim_mainlogcat /home/username/.contactemailexim -bpc List the messages in the queue:exim -bop List frozen mais:exit -bp | grep frozen | wc -l Summary of messages in the queue (count, volume, oldest, newest, domain, and totals):exim -bp | exiqsumm Display what Exim is doing right now:exiwhat Test Exim SMTP transactionexim -bh ipaddress  Display Exim settings exim -bP

Read more

Apache 403:Forbidden on sub-directory

Fix: restorecon -r /var/www/html The issue is caused when you mv something from one place to another. It preserves the selinux context of the original when you move it, so if you untar something in /home or /tmp it gets given an selinux context that matches its location. Now you mv that to /var/www/html and

Read more