Fixed a bunch of permissions issues for attaching files and hard linking them between processes