changed dirpermission to be a string