Why do I get a permission denied error message referring to folder when installing MATLAB on Macbook?

After installing the Matlab in macbook and run LeadDBS into it, I'm dealing with this problem:
bash: /Users/Documents/MATLAB/lead/ext_libs/ANTs/antsRegistration.maci64: Permission denied
bash: /Users/Documents/MATLAB/lead/ext_libs/ANTs/antsApplyTransforms.maci64: Permission denied

8 comentarios

I've already configurated my machine to accept other programms than those from apple store.
What exactly does "run LeadDBS" mean? The installer? The setup? The function?
Those are shared objects that need to be called from inside matlab, but instead they are being executed as if they were external executable programs or external shell scripts.
@Joyce Yamamoto how did you solve this issue? I'm getting the same errors using Lead in Matlab R2021a on MacOs 13 Ventura:
.../lead/ext_libs/BRAINSTools/BRAINSFit.maci64: Permission denied
Is it running an installation script at the time? If so then it could be indicating that the script is trying to write to the indicated destinations in unusual ways, using I/O redirection directly within the shell script (if it was trying to copy or move a file into a destination that did not have write access, then the message would include "mv" or "cp")
Example that can cause a message of that type:
system('bash -c "echo > /Password.m"')
bash: /Password.m: Permission denied
ans = 1
This kind of code would not typically appear inside a shell script, except for the case that some kind of output log file is being created to be appended to later. Code such as
system('bash -c "cp antsRegistration.maci64 ~/MATLAB/lead/ext_libs/ANTs/"')
would generate an error message that looked like
cp: /Users/Documents/MATLAB/lead/ext_libs/ANTs/antsRegistration.maci64: Permission denied
not bash:
Did you solved the problem ?
I have exactly the same problem with Matlab2022b and lead DBS 2.6
I found the answer, you can write :
system(['find "', ea_getearoot, '" -type f -name "*maci64" -exec chmod 755 {} \;']);
system(['find "', ea_getearoot, '" -type f -name "*maci64" -exec xattr -cr {} \;']);
system(['find "', fileparts(which('spm')), '" -type f -name "*maci64" -exec xattr -cr {} \;']);
system(['find "', ea_getearoot, '" -type d -name "*.app" -exec xattr -cr {} \;']);
in the command window
@yannick LONGUET Thank you very much! This solves the problem perfectly.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Productos

Versión

R2022a

Preguntada:

el 29 de Jul. de 2022

Comentada:

el 23 de Ag. de 2023

Community Treasure Hunt

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

Start Hunting!

Translated by