AKA: Choosing and setting safe file permissions for a WordPress install. If you have ever watched a WordPress security presentation, you’ve heard the advice: Generally speaking, directories should be 755 and files should be 644. But the presenter never tells...
This is a simple issue that trips me up every now and then. Let’s say you have a directory of a couple dozen themes all in zip files. It would be a pain to type “unzip filename.zip” for every single one,...
Having appended a line to /etc/hosts through BASH, what I really wanted to do, was add it via PERL. The basic operation would be the same: load a text file into a single variable, search a string for text, and if...
It is easy to append a line to a file in BASH. I wrote a short script this morning that I can use to add a single line to my servers /etc/hosts pointing any domain I want at the loopback IP...