fix permission in open()