Thanks, That seems to work for CHDK config A/CHDK/*.CFG and A/CHDK/DATA/ULTIMATE.0 The config data appears to be copied to volatile ram at boot because you can change the menu options on the fly. But after a power up reboot, the config is as set on the locked files. Yes, disabling controls would be a smart software way, but there would have to be a secret backdoor of key presses for an 'authorised' user to make changes.
Locking down is an interesting topic because there are so many controls now it's easy to have things working nicely, then screw everything up when you don't have a manual handy. I have this problem with my Nikon DSLR, but they like Canon have custom 'user' configs which can be saved to a PC or the memory card and brought back.
I was also looking for a nice text or inf file in CHDK with a human readable table I could edit on PC, but it's not like that. When I tried to change the ISO settings in CHDK to high values over 1000, it's a very long slow key press to get it there and editing a file would be quicker. Now I know I can write protect the config, I only have to spend time getting that right once as a work around.