Print this article Edit this article
Visual Studio Code permissions error
Visual Studio is installed on many systems for instructional use. Microsoft also provides Visual Studio Code which is much smaller. It can be downloaded from the page https://code.visualstudio.com/download . The zip file download can be extracted in Windows Explorer or using 7-Zip. Using VSCode in this way allows for it to be updated as needed.
For some users, launching VSCode results in the following error message.
Unable to write program user data.
A system error occurred (EPERM: operation not permitted, mkdir 'C:\puhome']
Please make sure the following directories are writeable:
\\nas01.itap.purdue.edu\puhome\ecn.data\bad\Code
First, when this error occurs, we do not recommend creating the folder "C:\puhome".
Second, this error appears to be related to VSCode v1.81.1. One solution is to remove VSCode v1.81.1 and install v1.80.0. The 1.80.0 installer is located at https://update.code.visualstudio.com/1.80.0/win32-x64-user/stable.
Another solution is to create or modify the shortcut used to launch VSCode to include the following:
"<path to VSCode>\Code.exe" --user-data-dir="W:\ecn.data\bad\Code"
This will result in the settings for VSCode to be written to 'W:\ecn.data\bad\Code" and the error message should no longer appear.
If you need assistance modifying this shortcut, please feel free to use the Contact Us form at https://www.purdue.edu/ecn/contactus.
Last Modified:
Sep 1, 2023 4:05 pm GMT-4
Created:
Aug 22, 2023 8:08 am GMT-4
by
skaluf
JumpURL: https://eng.purdue.edu/jump/2fd60e1