Granting MATLAB permissions to access folders

434 visualizaciones (últimos 30 días)
Stephen Pratt
Stephen Pratt el 5 de Abr. de 2021
Comentada: Balam Willemsen el 1 de Mayo de 2024
I started using MATLAB and wanted to change the Path. A window popped up and said, MATLAB is seeking permission to access this folder, do you want to grant it. I accidently clicked "No." How do I change that response and grant MATLAB permission?
  1 comentario
Balam Willemsen
Balam Willemsen el 1 de Mayo de 2024
For anyone else looking for this without resorting to chmod.
The setting is under Settings -> Privacy and Security -> Files and Folders.
Or, you can turn on "Full Disk Access" from Security->Privacy and Security.
Both require Administrator privileges. My comment is based on an Apple Silicon Mac running macOS 14.4

Iniciar sesión para comentar.

Respuestas (2)

Madhav Thakker
Madhav Thakker el 14 de Abr. de 2021
Hi Stephen,
A simple workaround could be to make that particular folder available to all users and all processes.
Hope this helps.

Jan
Jan el 14 de Abr. de 2021
Editada: Jan el 14 de Abr. de 2021
To modify Matlab's path variable, you need access to:
fullfile(matlabroot, 'toolbox', 'local')
Here the path is stored in pathdef.m. Remember that this concerns all users of the computer.
You cann get write permissions to this folder in the Windows Explorer (right click on the folder, Properties, Security -> Set Permissions), or with chmod under MacOS and Linux in a shell of the operating system.
It might be more useful to create your own pathdef.m file in a location, which is found earlier in the PATH, e.g. in your user folder. See: https://www.mathworks.com/matlabcentral/answers/23180-how-to-store-my-pathdef-m

Categorías

Más información sobre Startup and Shutdown en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by