updated patch for permissions patch, uses fileutil, needs cleanup