server: Allow opening a directory with write access (based on a patch