restore original permissions