Archive | Linux

Linux Ninja Tux

Chmod explained – Linux file permissions for beginners

If you have spent any time dealing with Linux based web hosting then you will almost certainly had encountered the term chmod. Chmod is a linux command and is an abbreviation of change mode. Chmod explained – Understanding permissions The mode is described by three or four octal (0 to 7) digits e.g. 0000 to […]

perl

cPanel : Pipe email script to extract attachments

If you want to automatically process images or other attachments that are sent to a mailbox address in your cPanel account, then you need look no further than the Pipe to Program option in the cPanel Forwarders screen. This is an often overlooked feature of cPanel accounts, probably because it’s not that easy to understand […]

hosting

DSO to SuPHP permissions problems and how to fix them

SuPHP is a CGI based handler for PHP, usually run using the suEXEC apache feature. This means that your PHP scripts are run using your linux user account’s privileges, but everything else is usually accessed using Apache’s anonymous account – usually called nobody Running PHP as DSO Apache module on the other hand runs both […]

cpanel

cPanel : useful shell commands for web developers

cPanel offers a lovely graphical interface for managing your files and databases, but sometimes it lacks the flexibility and power to answer all of your problems. Many cPanel hosts can provide you with SSH access to your account. SSH offers a secure terminal session, also called a Command Line Interface (CLI), giving you access to […]

Linux Ninja Tux

Linux : ModSecurity log analysis with Modgrep

ModSecurity is a popular open source Web Application Firewall that can be installed with popular web servers including Apache, IIS, and NGINX. Modsecurity log analysis can be configured via sequential or concurrent audit logging. Concurrent logging offer improved performance on extremely busy servers, but it creates a LOT of files and directories, so for simplicity […]

hosting

Hosting : Test a website before changing nameservers

Checking, testing and previewing a website on a new server before switching DNS settings used to be relatively easy. Historically you would test your website via Apache’s module. If your new hosting account username was, say, client1 then the temporary URL to the root of your website might be something like: http://hostingcompany.com/~client1/ Using this method […]

Linux Ninja Tux

Linux : Copy directory contents to another directory

Copying the contents of one directory into another sounds easy when you can drag and drop – but when you are faced with the command line, sometimes the simplest of things can become a headache. For the purpose of this tutorial, let’s assume our pretend file structure is as follows:

The way Linux expands […]