How do I resolve the "Access Denied Unable to install because you do not have write permissions to this folder: $MATLABROOT" error when installing MathWorks toolboxes via Add-On Explorer on Windows or Linux?

170 views (last 30 days)
When I try to install a MathWorks toolbox using the Add-On Explorer in MATLAB on Windows or Linux, I get the error: "Access Denied Unable to install because you do not have write permissions to this folder: $MATLABROOT". How can I resolve this and install the toolbox?

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 4 Nov 2025 at 0:00
This error appears because your user account does not have write permissions to the MATLAB installation folder ($MATLABROOT). This commonly happens if MATLAB was installed by an administrator or using sudo, and your current user does not have the same permissions. The Add-On Explorer cannot install MathWorks products (such as toolboxes) without write access to this folder.
To resolve this issue, install the toolbox using the MathWorks Installer or MATLAB Package Manager with the necessary permissions.
Refer to the following resource for steps on installing the toolbox as admin or with sudo via the MathWorks Installer method:
How do I install MATLAB and its toolboxes?https://www.mathworks.com/matlabcentral/answers/98886
Alternatively the MATLAB Package Manager may also be used to install the necessary toolbox. Please note that this will require running the MATLAB Package Manager with a PowerShell as admin if on Windows. Refer to the following resource for more information on the MATLAB Package Manager method:
What is the MATLAB Package Manager? How do I download and install products with it?
Please note that this issue does not typically impact support packages, which are installed to user-writable locations.
We recommend contacting your IT administrator for support on obtaining admin or sudo rights. 

More Answers (0)

Categories

Find more on Introduction to Installation and Licensing in Help Center and File Exchange

Tags

No tags entered yet.

Community Treasure Hunt

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

Start Hunting!