Replies: 1 comment 1 reply
-
Hi, |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
While trying to use the file.block() operation as root on a NetBSD target I discovered that /sbin and /usr/sbin are not in the PATH of the shell started from the SSH connection. And therefore chown(1) isn't available.
Why specifically it is this way isn't really relevant here. However, the PATH is set up correctly if a PTY is requested for the SSH channel. Requesting a PTY isn't desirable anyway because, apparently, that mixes up stdout and stderr.
NB: it is easily conceivable that pyinfra has to "fix" the PATH for other reasons. E.g. to customise it because of special needs for custom operations.
It is not difficult to change the target machine configuration so that subsequent logins via SSH have the correct PATH. However, that is a two-step process: first ensure the correct PATH is configured, second cause pyinfra to terminate affected SSH connections and reconnect.
What is the best way to achieve this?
Cheers,
--chris
Beta Was this translation helpful? Give feedback.
All reactions