better way to recover writting permissions