Why do I receive "Access Denied" or "Folder Error" when installing MATLAB on Linux?
281 次查看(过去 30 天)
显示 更早的评论
MathWorks Support Team
2016-12-6
编辑: MathWorks Support Team
2023-4-5
I am installing MATLAB on Linux using my user account. When I get to the step where I choose my installation location, I leave it as the default, /usr/local/MATLAB/R20XXx. Why does the installer give me a "Folder Error: Failed to create folder" or "Access denied: Unable to write to *"
采纳的回答
MathWorks Support Team
2023-4-5
编辑:MathWorks Support Team
2023-4-5
This message means that the account you are running the installer as does not have permission to write to the location you are trying to install MATLAB to. You can check permissions by navigating to the preceding folder (/usr/local/ in the example above) and running the command "ls -la" to check ownership and permissions.
To allow your user account to write to the location, you will want to run the command:
sudo chown -R $LOGNAME: /usr/local/MATLAB/R2023a
where "/usr/local/MATLAB/R2023a" is the folder you are trying to create a folder in and/or write to. This command gives your user account (which the system pulls from the $LOGNAME variable) ownership of the folder and all subfolders and directories, allowing you to read and write natively. If you are still unable to write to that location, you will need to use the chmod command to fix the permissions. One example:
sudo chmod u+rwx -R /usr/local/MATLAB/R2023a
will give your user account read, write, and execute permissions, and will allow any other account to read or execute (run) files in the directory or subdirectories.
Running the interactive installer as root/sudo is discouraged amongst the Linux community for security reasons.
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Introduction to Installation and Licensing 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!