Forget about my previous answer. I've copied the original code nd it is okay ;-). I've tested it on my machine on Fedora 11 and ruby 1.8.6 (2009-08-04 patchlevel 383) and I get right results in all different scenarios I tested. What about permission on /home directory?