Save the read-only state and restore it the next time the file is opened.