save doc permission fix