i don't have any idea what bug you're searching for in ftpfs, but in the program that you posted, your bug is that you are passing %M a Dir when it is supposed to get a long. even %D is supposed to get a Dir* not a Dir.
print(". %M\n", d->mode);
not
print(". %M\n", *d);
russ
