Why do I receive a "Permission denied" error when I try to save my Simulink model files in Simulink 7.0 (R2007b)?

K
Kashani · Sep 7, 2021 · 1.9K views
Question
When I open a Simulink model file, make some changes and then immediately try to save the file, I receive the following error:   “Error renaming mymodel.mdl to mymodel.bak. Permission denied”. However, if I wait for about 30 seconds and try to save the file again, the error does not occur. This happens whether or not I have pre-save and post-save callback defined for the models.
Expert Answer
Profile picture of Neeta Dsouza
Neeta Dsouza PhD Expert
Answered Aug 13, 2026
If the option to show M and MDL-file descriptions is turned on in the current directory section of the user’s preferences, the MATLAB desktop will temporarily lock the files in the current directory to obtain these file descriptions. If the save event for the model file occurs at the same time, then the user can receive the permission denied error.
 
To workaround this issue, please try unchecking the option 'Show M and MDL file Descriptions' in MATLAB File menu -> Preferences -> Current Directory.
100% Run Guarantee 3-Hour Fast-Track Delivery

Need a Custom Version or Complete Simulation for This Problem?

Our 500+ PhD engineers build, debug, and optimize working MATLAB scripts and Simulink (.slx) models tailored to your exact assignment rubrics with zero plagiarism.

Tested on MATLAB R2024b / R2026a
Turnitin 0% Plagiarism Report
Free 7-Day Revisions Guarantee
Have a different question? Ask here

Get a Free Consultation or a Sample Assignment Review!