MATLAB: Do I get an error creating a folder during activation or launching MATLAB on Mac OS X

MATLAB

When I attempt to activate or launch MATLAB, I get the following error:
There was an error creating the folder: /Users/<username>/.matlab/R20xxx_licenses
How do I activate my license and launch MATLAB?

Best Answer

MATLAB will not activate or launch if you do not have appropriate permissions to your Mac's Home folder to create a permanent location for the license file. When moving files over from one Mac to another, this issue sometimes occurs as well.
To resolve the issue, open a Finder Window and click on your Home folder. In the top left, go to File > Get Info. Here click on the grey triangle next to "Sharing & Permissions" if this is not already expanded. Add yourself as the folder owner by clicking on the plus sign, +, at the bottom left. Select your own user account
from the list by clicking on it and click on the "Select" button. After, your name should appear in the list under "Name" at the very top next to the person icon. Make sure in the permissions column that you have "Read and Write" access. If you do not, change this by clicking on the arrows to the left of it and selecting
"Read and Write".
Once you have ownership of your Home folder and read and write permissions on it, you should be able to launch and activate MATLAB.
Alternatively, you can also repair your hard drive disk permissions by going to Applications - Utilities - Disk Utility. Then run "Repair Disk Permissions". When finished, attempt to activate or launch MATLAB.