Fixes the ownership of deployment directories.