Steve Losen scl@sasha.acc.virginia.edu writes:
chown($newuid, $newgid, $_);
This rings a warning bell. How does Perl treat symlinks when doing a chown? If it follows symlinks you have to be careful, or else you can wind up giving files all over the file system to the wrong user.