As for maintenance mode: add a line in config.php with the parameter described here: ownCloud Documentation Overview
As for locked files: I am not the expert for that but: never change files in data directory by yourself as those changes need to be done in the database as well (what you should not edit directly, too)
Try to read about locked files using google, start with this: File is locked - how to unlock