update index and remove permission