umask shouldn't affect chmod. It's more likely that you're passing the wrong filename or you're in the wrong
directory, or something like that. Try running the script using
strace to see what args the actual chmod() system call is
being invoked with.
Dave.