Fix upload rorate file and default permission