Add user to sudo user

Mys system has only one user with account type administrator and administrator privileges enabled in User Management. But when run commands like

npm run watch 

or save files i.e *.php, *.js, *.scss the Visual Studio Code gives this error
Failed to save 'app.js': Insufficient permissions. Select 'Retry as Sudo' to retry as superuser.

And I have to enter sudo password everytime I save the file. How do I disable this ?

Where do you save those files? In the / path?
You should save them in your user home, then no password will be required/asked.

As administrator, your user is already part of the sudoers.

You should not work as "root" always.

Normally, two accounts are created: "root" and "normal user".

1 Like

They are saved in /home/sites/project-name

Post output

ls - la /home/

user name is sites?


I moved the project folder to /home/user/project-folder

@bantawa04 That is the solution, not your execution :wink:


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by