Fix permission problems. Tighten restrictions and improve logging of /enchant-book.