openssh Windows错误的所有者或权限 [英] openssh windows bad owner or permissions

查看:108
本文介绍了openssh Windows错误的所有者或权限的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经为Windows安装了openssh,运行ssh localhost时我得到

I've installed openssh for windows and when I run ssh localhost I get

C:\ Users \ gary/.ssh/config的所有者或权限不足

Bad owner or permissions on C:\Users\gary/.ssh/config

我已经看过这两个问题 https://superuser.com/questions/348694/bad-owner-or-permissions-error-using-cygwins-ssh-exe

I've looked at these 2 questions https://superuser.com/questions/348694/bad-owner-or-permissions-error-using-cygwins-ssh-exe and https://serverfault.com/questions/253313/ssh-returns-bad-owner-or-permissions-on-ssh-config but none of the answers work for me. sshd is running as a service as the Local System user. I've run chmod 0600 C:\Users\gary\.ssh\config and chown gary C:\Users\gary\.ssh\config. I've also cleared the ACL by running setfacl -b C:\Users\gary\.ssh\config and then chmod 0600 C:\Users\gary\.ssh\config again. I've also tried changing the owner to SYSTEM and got the same error.

我不确定该怎么办,我的设置有什么问题吗?我还安装了gitw,安装了mingw,我从git安装中删除了ssh和sshd,所以它们不会出现在我的路径上.

I'm not sure what else to do, is there anything wrong with my setup? I also have git installed which installed mingw, I deleted ssh and sshd from my git installation so they wouldn't be on my path.

我运行的其他命令是 icacls "C:\Users\gary\.ssh\config" /setowner gary chown -R gary:1049089 C:\Users\gary\.ssh

Other commands I've run are icacls "C:\Users\gary\.ssh\config" /setowner gary chown -R gary:1049089 C:\Users\gary\.ssh

ls -la C:\Users\gary\.ssh\config显示

-rw-r--r-- 1 gary 1049089 229 Jan 3 14:43'C:\ Users \ gary.ssh \ config'

-rw-r--r-- 1 gary 1049089 229 Jan 3 14:43 'C:\Users\gary.ssh\config'

即使将所有者更改为SYSTEM后,它仍然会显示此消息,但是在文件资源管理器的文件属性中,它将SYSTEM显示为所有者

it keeps showing this even after changing the owner to SYSTEM, but in the file properties in file explorer it shows SYSTEM as the owner

推荐答案

在我创建了另一个具有管理员权限的用户后,此帐户立即弹出,并且该帐户开始继承对我的.ssh文件夹的访问权限.

This started popping up immediately after I created another user with Administrator privileges, and that account began inheriting access to my .ssh folder.

您无需更改任何权限.

只需转到.ssh,右键单击属性",安全性"选项卡,高级".禁用继承,然后单击管理员用户(不是您的用户)并将其删除.申请.完成.

Just go to .ssh, right-click Properties, Security Tab, Advanced. DISABLE INHERITANCE, then click on the Administrator user (the one that is not you) and Remove them. Apply. Done.

这篇关于openssh Windows错误的所有者或权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆