I know this question has been asked before, but none of the advised solutions have worked for me. I am on a Mac and trying to save changes to a VS Code file. When I press save, it says
Insufficient permissions. Select 'Retry as Sudo' to retry as superuser.
When I choose to "Retry as Sudo" I enter my password and it says
Failed to save... Error using --file-write: EPERM: operation not permitted
I have tried a couple of different things to open VS Code with admin privileges, including running it from the terminal with the command:
sudo open /Applications/Visual\ Studio\ Code.app/Contents/MacOS/Electron
and manually adding VS Code to my path using the commands
cat << EOF >> ~/.bash_profile
# Add Visual Studio Code (code)
export PATH="\$PATH:/Applications/Visual Studio Code.app/Contents/Resources/app/bin"
EOF
I have yet to find anything that affects the failed to save error, and if anyone has any suggestions, they would be greatly appreciated!
05-03-2021
This works for me.
Sudo chown –R username folder-path
e.g
sudo chown -R sampath /Users/sampath/Desktop/Test/renoTracker/platforms/ios
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With