Why do I get an error regarding "Could not be written to the disk/drive"?

206 views (last 30 days)
When I run activation or deactivation using the Internet or without the Internet I get an error that includes:
"Could not be written to the disk."

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 16 Apr 2020
Edited: MathWorks Support Team on 16 Apr 2020
In general this error occurs because you do not have permission to write to the license file directory. The remedy for this varies depending on your operating system.
Windows
Windows default security settings prevent users from writing to the Program Files directory. To work around this problem on Windows, launch the activation client directly as an administrator.
By default, the activation client is located here:
"C:\Program Files\MATLAB\R20XXx\bin\win64\activate_matlab.exe"
Right click on the activate_matlab.exe and select “Run as adminstrator.” Proceed with the activation process normally. If you are unable to run the application as an administrator, please contact your system administrator for assistance.
Mac
On Mac this can happen if you are not the owner or do not have permissions to write to the MATLAB application package. To resolve this issue:
If MATLAB does not start:
  • Locate the MATLAB application package in your applications folder
  • Right-click/control-click on the MATLAB icon and select “Get Info”
  • Under “Sharing & Permissions,” make sure that you have Read & Write permissions under the “Privilege” column in the table of users.
If running the installer:
  • Locate the MATLAB application package (matlab_R2XXXx_maciXX.dmg) in your downloads folder
  • Right-click/control-click on the MATLAB dmg and select “Get Info”
  • Under “Sharing & Permissions,” make sure that you have Read & Write permissions under the “Privilege” column in the table of users.
If the error persist when installing or starting:
  • Click on the finder icon (Icon with the smiley face on the Dock)
  • Click on the "Go" menu on the top left hand side of your display
  • Click on "Home"
  • Right-click/control-click on the Applications folder and select “Get Info”
  • Under “Sharing & Permissions,” make sure that you have Read & Write permissions under the “Privilege” column in the table of users.
If you are unable to grant yourself Read & Write permission, please contact your system administrator for assistance.
Linux
On Linux this error indicates that you do not have permission to write to the licenses folder. Launch the activation client with sudo to work around this. by default the activation client is located here:
/usr/local/bin/glnxa64
Run these commands to activate MATLAB as sudo:
cd /usr/local/bin/glnxa64
sudo ./activate_matlab.sh
Ubuntu’s sudo behavior is different from most other Linux distributions, so you need to add the -E flag if you are on Ubuntu:
sudo -E ./activate_matlab.sh
If you are unable to run the activation client as sudo please contact your system administrator for assistance.
  5 Comments
THONTI BEERAIAH
THONTI BEERAIAH on 15 Dec 2021
Thank you dude you are not less than god for me. I was trying to solve this for 2 days but still couldn't

Sign in to comment.

More Answers (3)

Henrik Andresen
Henrik Andresen on 5 Feb 2018
This does not help to deactivate

Ana Egatz-Gomez
Ana Egatz-Gomez on 25 Aug 2021
I am using MacOS Big Sur 11.5.2 and had the same problem. After trying without success changing the permissions to the Applications folders, etc., I finally succeded by installing the Matlab app to the Desktop folder, and then just drag-moving it to the Applications folder.

Adam Smiarowski
Adam Smiarowski on 17 Dec 2020
Deactivate on the Mathworks website (after logging into your account).

MathWorks Support

Tags

No tags entered yet.

Products


Release

R2010a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!