[PATCH v6 3/4] server: Open files for writing with O_WRONLY not O_RDWR if FILE_READ_ATTRIBUTES is also requested