At Bharat's suggestion I have upgraded the site to the latest version of Gallery.
I apparently had missed a notice that there was a significant security hole in the 1.3.1 version that I was running.
I would still be interested in knowing if there are any steps I can take to limit my vulnerability. I assume the jerk who accessed my site will be encouraged to try even harder now that I've responded to his vandalism by upgrading the software.
The site is on a commercial server that runs virtual hosts under Unix and Apache. I don't have shell access, just FTP.
John Hughes