isPermissionRight($new_parent_dir)) { chmod($new_parent_dir, 0755); } return $renamed; } }