Reconstructing heavily damaged hard drives

[EDIT: Hey guys, thanks for the feedback! Someone over at virtuallyhyper.com has an awesome write up that deals with SD cards specifically (but is highly relevant to hard drives too), with a set of much improved and updated scripts. I’d strongly recommend taking a look…

Daemon permissions and posix_setgid()

posix_setgid only sets the primary group for the process.  So make sure the group permissions you’re relying is a single group, who’s GID is set in /etc/passwd. Took me over an hour to trace that bug down today.

Bugfixes and coding

I’ve spent the last couple of days bugfixing some code I wrote for the church website and writing some new code for various things. Had a superb headache while chasing one extremely weird bug just now, the piece of code below was never giving me…