set mode to 0777