vScode显示了在安装我的Ubuntu的root/computer分区中保存文件的权限不足
显示的Vscode无法保存'index.html':权限不足。选择“重试sudo”作为超级用户
重试 在保存位于根/计算机目录中的文件时,该如何解决?
我希望没有超级用户无需超级用户就可以自动完成工作。我该怎么做?
VScode showing Failed to save 'index.html': Insufficient permissions. Select 'Retry as Sudo' to retry as superuser
while saving a file located in the root/computer directory how can I solve this?
I want autosave work without super user or keep super user active. How can I do this, please?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我访问的问题是,auth弹出窗口有一个问题,我注意到有许多具有同一问题的应用程序。
要解决,我建议您修改您的sudo选项,而不包括
nopasswd
。就我而言,碰巧我升级到了一个较新的OS版本,并且这两种操作都是确保您使用相同情况的最简单方法是转到

settings>用户
您应该看到解锁选项单击它,默认情况下,您应该获得请求密码的弹出窗口。如果不是那是您的真正问题,那不是VSCODE
The issue in my access was that the auth popup had an issue, I noticed there's many apps with the same issue.
To resolve I'd suggest revising your sudo options and don't include
nopasswd
. In my case it happened that I upgraded to a newer OS version and both actionsThe easiest way to make sure you've the same case is to go to

Settings > Users
You should see unlock optionClick it and in default you should get a popup requesting your password. If not that's your real issue it's not vscode
如果您希望它与Ubuntu用户(不是Sudo)一起使用,请使用以下命令更改特定文件或目录的所有权。
$ user
是一个存储当前 ubuntu用户名的环境变量。pwd
&复制绝对路径,例如/home/user_name/desktop/folder_name/
。注意:使用
sudo
和用敏感的系统目录进行
时要谨慎,因为不当使用可能会导致权限问题。If you want it work with your ubuntu user(not sudo) then change the ownership of a particular file or directory using the below command.
$USER
is an environment variable that stores the current ubuntu username.pwd
inside the folder where the file resides & copy the absolute path e.g./home/user_name/Desktop/folder_name/
.<path to file/ directory_name>
above.Note: Be cautious when using
sudo
andchown
with sensitive system directories, as improper usage can cause permission issues.