The master's immediate actions upon the vessel running aground include sounding alarms, stopping engines, accounting for crew, closing watertight doors, activating the ship's pollution plan, and assessing damage with the crew. The master would then report the incident, attempt to refloat the vessel if possible, and communicate details to the owner. Legally, the master should note a protest, possibly sign a salvage contract, and send a detailed report to the owner. Commercially, the master needs to minimize danger and pollution risks while determining if refloating is possible with tides or cargo adjustments.