Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Failed to save: Insufficient permissions. Select 'Retry as Sudo' to retry as superuser. M1 Mac

I just cloned a GitHub repository on my M1 mac and opened the folder with VsCode but when I make changes in the file and try to save it, I get the error Failed to save 'Home.js': Insufficient permissions. Select 'Retry as Sudo' to retry as superuser.

What might be the solution?

like image 773
GOKARNA ADHIKARI Avatar asked Jan 26 '26 23:01

GOKARNA ADHIKARI


1 Answers

You need to change your permissions for this file.

You can see the permissions for this file running the command:

ls -@l file

To change the permissions you can run

sudo chown -v username directory

If you want to change permissions on a whole directory run:

sudo chown -Rv username directory
like image 65
lorenzorzd Avatar answered Jan 28 '26 17:01

lorenzorzd



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!