Interactive ask permissions

follow #185 and ref #121
Sorry, I rebased it and made another PR.