Fix bug with setting permission type to mac.

Ticket: #5839