错误:EACCES:拒绝了权限,仅在VSCODE中使用远程SSH

发布于 2025-02-13 16:12:42 字数 679 浏览 1 评论 0原文

我可以找到有关此错误的大量参考,但是它们都指出了权限问题,但是我的权限似乎很好,因为我可以使用Nano和ssh修改此文件夹。

我正在尝试将Remotessh与自定义用户帐户一起使用,用户

服务器正在运行Debian 11和Nginx

I具有基于密钥的auth,并且我连接到服务器。当我尝试在Web文件夹中创建或删除文件(/var/www/html)时,我会得到此错误消息消息错误:EACCES:eacces:decrimed decrienct<我试图尝试的内容做,即重命名文件,或删除文件>

在Windows 10中的OpenSSH)来完成所有这些操作

我可以使用标准的SSH连接(内置 /var/www/设置为www-data(递归)

用户是组的成员www-data

我需要在VSCODE中执行任何操作以更新权限吗?我想念其他东西吗?

这是我使用的确切命令:

sudo adduser user www-data
sudo chown -R www-data:www-data /var/www
sudo chmod -R 0775 /var/www

I can find plenty of references to this error, but they all point to permission issues, however my permissions appear to be fine as I can modify this folder using nano and SSH.

I'm trying to use RemoteSSH with a custom user account, user

The server is running Debian 11 and nginx

I have key based auth and I connect to the server. When I try to create or remove a file in the web folder (/var/www/html) I get this error message Error: EACCES: permission denied, <what I was trying to do, i.e. rename a file, or delete a file>

I can do all of these things using a standard SSH connection (openSSH built in to Windows 10)

The owner of /var/www/ is set to www-data (recursively)

user is a member of the group www-data

Do I need to do anything in VSCode to update permissions? Am I missing something else?

Here are the exact commands I used:

sudo adduser user www-data
sudo chown -R www-data:www-data /var/www
sudo chmod -R 0775 /var/www

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

清醇 2025-02-20 16:12:43

好的,我在发布此内容后立即进行了更多的谷歌搜索,并且我能够通过在主目录中删除.vscode-server文件夹来解决此问题。

https://github.com/microsoft/vscode-remote-release/issues/3399#issuecomment-922935448

我不确定不确定是否有不太容易的方法来解决此问题或每次更改权限时必须这样做。

OK I did a bit more Googling right after posting this, and I was able to fix this by deleting the .vscode-server folder in the home directory.

https://github.com/microsoft/vscode-remote-release/issues/3399#issuecomment-922935448

I'm not sure if there is an easier way to fix this without doing so, or having to do that every time permissions are changed.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文