我正在按照 这些说明 在 WSL 上设置 LAMP。我进入了步骤 3,并在“进行这些编辑:”之后进行了指示的编辑。但是,在使用 VSCode 编辑 sshd_config (在 WSL-2 窗口中,我认为这可能很重要)之后,我无法保存它并继续按照说明进行操作。
当我尝试保存时,VSCode 首先弹出此错误:Failed to save 'sshd_config': Insufficient permissions. Select 'Retry as Admin' to retry as administrator.
Failed to save 'sshd_config': Command failed: "C:\Users\smith\AppData\Local\Programs\Microsoft VS Code\bin\code.cmd" --file-write "c:\Users\smith\AppData\Roaming\Code\code-elevated-BmAuYzjZ" "\\wsl.localhost\Ubuntu\etc\ssh\sshd_config" Error using --file-write: EPERM: operation not permitted, open '\\wsl.localhost\Ubuntu\etc\ssh\sshd_config'