change from permissions to dirpermissions and filepermissions