Closed Xlin123 closed 1 week ago
we should ideally chown it and if not permitted, abort with a message saying “please sudo chown this directory”
I don't think sshnp should do this, for a few reasons:
The $USER running sshnp, should already own $HOME/.ssh, and if they don't, then the environment is messed up and it's not within the scope of our application.
This code shouldn't be executed with the v5.3.0 & later client with a v5.3.0 & later / C daemon. We only kept this code for backward compatibility with older daemons
we should ideally chown it and if not permitted, abort with a message saying “please sudo chown this directory”
I don't think sshnp should do this, for a few reasons:
- The $USER running sshnp, should already own $HOME/.ssh, and if they don't, then the environment is messed up and it's not within the scope of our application.
I think a helpful error message is required. And in this case, wasn't the environment messed up by the sshnp installer?
- This code shouldn't be executed with the v5.3.0 & later client with a v5.3.0 & later / C daemon. We only kept this code for backward compatibility with older daemons
Good point
Describe the bug
sshnp -t @bagel69 -f @almond842 -r @rv_am -d apaz
Error : Error: 1 Operation not permitted Message: chown failed error: Operation not permitted
Stack Trace: #0 chmod (package:posix/src/unistd/unistd.dart:409)
1 new LocalSshKeyUtil (package:noports_core/src/common/at_ssh_key_util/local_ssh_key_util.dart:41)
2 new _SshnpOpensshLocalImpl&SshnpCore&SshnpLocalSshKeyHandler (package:noports_core/src/sshnp/impl/sshnp_openssh_local_impl.dart:10)
3 new SshnpOpensshLocalImpl (package:noports_core/src/sshnp/impl/sshnp_openssh_local_impl.dart)
4 new Sshnp.openssh (package:noports_core/src/sshnp/sshnp.dart:28)
5 createSshnp (package:sshnoports/src/create_sshnp.dart:28)