chmod the commited db so it's readonly. And catch an error if it occurs