CGIV-1013: Made setting permissions optional