gary's blog

Cleaning up after Backup and Migrate.

by Gary Gogick Published: April 4th, 2011
Tagged: drupal, hax
Tagline: 
It's in my /tmp, killing my doodz!

…Ran into an issue where Backup and Migrate wasn’t cleaning up after itself - mysql dumps were sitting in /tmp, stacking up, and causing disks to fill up.

Even if it were cleaning up after itself, I’m dealing with a clustered site. It’s my understanding that cleanup should occur on cron - but running cron on every webserver is kind of, well, meh.

Since I’m a believer that all problems can be resolved with perl, the following script can be invoked via system cron, and will clean up any backup_migrate_*.mysql files that are older than one day.

Drush in RPM Form

by Gary Gogick Published: October 13th, 2010
Tagged: centos, drupal, drupal planet, drupal-planet, drush, rhel, rpm
Tagline: 
yum.

Drupal without drush is like a burger without cheese. So when, in the course of human events, it becomes necessary to ensure that a specific version of drush is installed on a number of systems in a standard location, falling back to your distribution’s package management system is probably a good idea.

Thus, I’ve hacked together a quick script that’ll grab a version of drush and turn it into a noarch binary RPM, suitable for use on RHEL/CentOS (and probably Fedora, for that matter).  read more »

CentOS 5.5 and Thrift/Scribe

by Gary Gogick Published: July 20th, 2010
Tagged: centos, scribe, thrift
Tagline: 
Installation, annoying. Configuration? Anyone could do it. <3 Scribe.

Prerequisites:

We’ll be doing some git-retrieval, meaning we need git installed. Being a sysadmin by trade, I’m naturally lazy, so I’m happy to just pull the git package from EPEL.

As for the rest, we’re doing some compiling - so, it’s necessary to make sure gcc-c++/etc. are available.  read more »

HTTP Auth: Demand Satisfaction

by Gary Gogick Published: February 29th, 2008
Tagged:

I just had an interesting question posed to me. Say you have a site that needs the usual generic http auth stuff. But say you have a few directories that you don’t want to require credentials for. And pretend you can’t use .htaccess.

 read more »

            AllowOverride All
            AuthUserFile /path/to/.htpasswd
            AuthType Basic
            AuthName "Iz Sekritz, Shhh"
            Require valid-user


            Satisfy Any

Four Lines That Should Be In Your Postfix Configuration

by Gary Gogick Published: November 17th, 2007
Tagged:

EHLO lolucanhazspam happening too often for your tastes?

Have Postfix respond with, “u sent me spam, but i ated it”:

smtpdhelorequired = yes smtpddelayreject = no disablevrfycommand = yes smtpdhelorestrictions = permitmynetworks, rejectinvalidhostname, rejectunknownhostname, rejectnonfqdnhostname

Over the past hour, I’ve seen this minor config change slay 60% of spam inbound to my personal mailserver.

Remember: Default software configs given to you by your favorite Linux distribution will usually suck. Modify ‘em.

Self-Signed SSL

by Gary Gogick Published: August 19th, 2007
Tagged:

Internet security is like urinating to windward. No matter what we do, we’re never going to stop users from using a certain web browser, a certain mail client, a certain operating system, and opening every .exe or suspicious file that gets sent to them. That shouldn’t stop our efforts, though. If there’s one thing the Internet needs, it’s more security.  read more »

PHP5.2.X On CentOS: --with-imap, Or Not

by Gary Gogick Published: August 9th, 2007
Tagged:

So a funny thing happened to me on the way to the office this morning. I tripped over a cat and spilled my coffee everywhere. Hey, I laughed.  read more »

Dealing with corruption of rpmdb

by Gary Gogick Published: July 12th, 2007
Tagged:

(The following takes place between 4:40 AM and 4:50 AM on Thursday, July 12th, 2007. Cool digital clock noises.)

rpmdb: Lock table is out of available locker entries

What is this, why is it showing up some tens of times, and why is it being followed by a suggested resolution of installing bash?

For a program that doesn't need bash?

When you already have bash installed?  read more »

You can’t run Drupal without dealing with MySQL. Unless you run it with PostgreSQL. But that’s another topic entirely.

Right, then - as it were, one thing we’ve continually noticed is that the default MySQL configurations that come with most Linux distributions.. Well, for lack of a better word, suck.  read more »

FTP is Evil?

by Gary Gogick Published: June 1st, 2007
Tagged:

We’ve all heard that before. “FTP is bad! Use SCP/SFTP!” “FTP is a security risk!” “FTP eats babies!”

Frankly, over the past two years, I’ve seen far more compromised servers due to people not patching PHP than from servers running FTP daemons. If you keep your server up to date using the distribution-provided tools, FTP servers are relatively benign.  read more »

Papernote