-
Notifications
You must be signed in to change notification settings - Fork 155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PermissionError: [Errno 13] Permission denied: '/root/.ssh/crt' #734
Comments
Are you trying to use the X.509 certificate capabilities in AsyncSSH? You shouldn't have something named "crt" in your .ssh directory unless you are, and in that case it should be a directory, not a plain file. When present it is used as a "hash directory" for X.509 certificates you want to use for client authentication. That said, I'm guessing the error here may be that the .ssh directory is not readable, as I wouldn't expect the isdir() call to fail with a permission error here unless the parent directory is not readable. It may also be that the '/root' directory is not readable. Are you actually running this client as root on the local machine, with a home directory of /root? Is there a .ssh directory under /root? What are the permissions on /root and /root/.ssh? Are those directories readable by the user you are running as? |
The home directory is /root It worked fine some time ago, but it hasn't worked recently |
What are the permissions on /root and /root.ssh, though? Unless you are running as root, I wouldn't expect those directories to be readable even if /root/.ssh/crt is readable to all. Also, as I mentioned, 'crt' shouldn't be a plain file. What are you trying to do here with that? |
I'm running as root |
If you are truly running as root, I don't know why the OS would give you a "Permission denied". I can get that error here, but only when I'm running as non-root and the directories are only accessible by root. Even when I set the permissions to make /root and /root/.ssh completely unreadable to all, it doesn't given an error when I run as root. Is /root on a remote volume that might not allow root user access? If you remove the "crt" file, do you still get this error? |
I'm not running as root and I'm still getting this for some reason. |
Unfortunately, there's nothing I can really do about this in AsyncSSH. The error is being returned by your OS. If you're really running as root, the only case where I've seen something like this is when accessing files on a remote volume that doesn't preserve root access. |
error info:
code:
> Error thrown when I use ssh_execute and a valid certificate is passed: PermissionError: [Errno 13] Permission denied: '/root/.ssh/crt''
info:
Ubuntu22.04 LTS
-rwxrwxrwx 1 root root 0 Jan 25 08:22 /root/.ssh/crt
The text was updated successfully, but these errors were encountered: