Neither stream nor file should require 0777 use 0644 instead, closes #1962.