Wednesday, June 06, 2007

crf250r

I just got a 2006 crf250r over the weekend, and it is awesome! It is replacing a 1989 cr250, that was on it's last legs and was really becoming expensive to keep running.. Not to mention it was extremely unsafe..

I'm pretty much a novice rider, and the new bike has given me a ton of confidence.. I really didn't know what it felt like to ride a good bike

Tuesday, February 20, 2007

SuExecUserGroup in apache2

A better solution to use the default user running apache, in my case www-data...

******************************************************************************

I had been messing around with some encryption routines using Crypt::GPG under perl...and needed it all to run under apache2

I'd do something like:

# decrypt.pl
my @encrypted = ;
my $decrypted = $gpg->decrypt( \@encrypted );

print $decrypted;


Running it from the command line was all good.. I got my decrypted text... But I really needed the code to run in the context of apache..

The solution on ubuntu, ended up being to create a new user, call it 'decrypter'... Set SuexecUserGroup decrypter decrypter, in my apache conf.. chown /var/www to be owned by decrypted..(/var/www seems to be the location that is compiled in by default for suexec.. it's alot easier to move my webdocs, not owned by decrypter elsewhere and change a line of config or two.. )

using a simple shell script helped me alot...

#!/bin/sh
echo "Content-type: text/plain"
echo ""
echo `whoami`


You will see a user like www-data or nobody if you are not using suexec, or the or you suexec user if you are...

Oh..and it also is important that you symlink (I prefer the shorthand using a2enmod ) the suexec module if running under apache2..