Linux Archives

Over 80% is running on some form of Linux – so does your Mac and you iPhone. Sometimes we have to get our hands dirty on the command line – it makes you feel like a proper hacker.

Here are some pointers I picked up on my journey.

Upgrade Trouble: when WordPress is asking for FTP details, but there’s no FTP server on your system

I was working on a CentOS 7 server the other day that had a LAMP stack installed. It was used to host only a single instance of WordPress. Upgrading themes and plugins from the admin interface worked fine, but curiously, WordPress core upgrades did not. Instead, WordPress was asking for FTP details every time, which also … Read more

How to install Python 3 from source in CentOS

python-logoCentOS 6 comes with Python 2.6 installed, and CentOS 7 comes with Python 2.7. But right now, Python 3.5 is all the rage, so I thought I’d install it alongside Python 2.x on the same machine.

Here’s how I did it.

I’m using a CentOS 6 32 bit system here, but I’ve tried the same on a CentOS 7 64 bit rig. You need to be root or have superuser privileges to do this successfully.

Read more

How to extract tar.xz files on CentOS

I’ve recently come across a tarsal files that used xz compression (namely the Python source code). This means that my usual way of extracting a tarsal via the command line using the following command did not work: tar -zxvf Python* gzip: stdin: not in gzip format tar: Child returned status 1 tar: Error is not … Read more

How to fix “MLSD unable to build data connection” in ProFTP

I’ve come across an odd problem today on a server that’s been working fine for all kinds of FTP traffic for many years. Turns out that today, FileZilla started complaining about explicit TLS connections (when available) and gave the following error message: 425 MLSD unable to build data connection: operation not permitted Clients could still … Read more

How to remove an IP from the CBL (Composite Blocking List)

Today I was introduced to something called the CBL, or the Composite Blocking List. This is one of several Spamhaus projects that’s there to make sure IP’s are blacklisted when they’re sending spam.

You can check if your IP’s are OK at http://www.spamhaus.org/lookup/

The CBL is a separate website in which you can also lookup IPs. Spamhaus will tell you if that’s the case and direct you to the CBL here: http://www.abuseat.org/lookup.cgi

Even though my IP was otherwise fine, it was listed in the CBL, and Yahoo kindly made me aware of this as part of an error message I’ve received when trying to send an email. If ever there is an email problem in CentOS, the first place to look is /var/log/maillog. Here’s Yahoo’s very helpful explanation: https://help.yahoo.com/kb/postmaster/SLN5070.html

Turns out that the hostname was not setup yet, so the box would respond as localhost.localdomain. That’s a big fat no-no as far as the CBL people are concerned. Here’s CBL’s explanation:

This IP address is HELO’ing as “localhost.localdomain” which violates the relevant standards (specifically: RFC5321).

The CBL does not list for RFC violations per-se. This _particular_ behaviour, however, correlates strongly to spambot infections. In other words, out of thousands upon thousands of IP addresses HELO’ing this way, all but a handful are infected and spewing junk. Even if it isn’t an infection, it’s a misconfiguration that should be fixed, because many spam filtering mechanisms operate with the same rules, and it’s best to fix it regardless of whether the CBL notices it or not.

Read more

How to set the hostname on CentOS and Fedora

CentOS 7 has a nice command called hostnamectl. With it we can display the current hostname, and set any of the three types of hostname: static hostname (something like example.com) transient hostname (anything you like, assigned when using DHCP) pretty hostname (something like Jay’s MacBook Pro) By default, a CentOS installation comes back with localhost.localdomain … Read more