Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

VSCode's "Retry as admin" function doesn't work in Debian 12

Programming languages, Coding, Executables, Package Creation, and Scripting.
Post Reply
Message
Author
eugrus
Posts: 34
Joined: 2022-12-01 11:13
Has thanked: 7 times

VSCode's "Retry as admin" function doesn't work in Debian 12

#1 Post by eugrus »

Like KDE apps do, VSCode also has a way to save a file with root privileges without starting the app via sudo.

However once I try to save a file to /var/www that way, it fails and I get an invitation to "Retry as admin" again.

Is it fixable?

User avatar
dilberts_left_nut
Administrator
Administrator
Posts: 5347
Joined: 2009-10-05 07:54
Location: enzed
Has thanked: 13 times
Been thanked: 66 times

Re: VSCode's "Retry as admin" function doesn't work in Debian 12

#2 Post by dilberts_left_nut »

That is a poor approach.
If you want your user to have write permissions in /var/www you should set the permissions appropriately, probably as part of a group.
Check the existing permissions.
NOTE: You DO NOT want your web server user (www-data) to have write permissions to the webroot.
AdrianTM wrote:There's no hacker in my grandma...

eugrus
Posts: 34
Joined: 2022-12-01 11:13
Has thanked: 7 times

Re: VSCode's "Retry as admin" function doesn't work in Debian 12

#3 Post by eugrus »

dilberts_left_nut wrote: 2024-01-14 04:38 That is a poor approach.
If you want your user to have write permissions in /var/www you should set the permissions appropriately, probably as part of a group.
Check the existing permissions.
NOTE: You DO NOT want your web server user (www-data) to have write permissions to the webroot.
I've tried

sudo adduser eugrus www-data
sudo chown -R root:www-data /var/www

Didn't change things.

User avatar
dilberts_left_nut
Administrator
Administrator
Posts: 5347
Joined: 2009-10-05 07:54
Location: enzed
Has thanked: 13 times
Been thanked: 66 times

Re: VSCode's "Retry as admin" function doesn't work in Debian 12

#4 Post by dilberts_left_nut »

What says:

Code: Select all

ls -l /var/www
AdrianTM wrote:There's no hacker in my grandma...

eugrus
Posts: 34
Joined: 2022-12-01 11:13
Has thanked: 7 times

Re: VSCode's "Retry as admin" function doesn't work in Debian 12

#5 Post by eugrus »

dilberts_left_nut wrote: 2024-01-15 05:26 What says:

Code: Select all

ls -l /var/www
Thank you!

Had to chmod g+w indeed!

Post Reply