fix keymap bug
handle permissions and ownership