Bug 2679

Summary: ssh mux process (and maybe others) should perhaps cd /
Product: Portable OpenSSH Reporter: Christoph Anton Mitterer <calestyo>
Component: sshAssignee: Assigned to nobody <unassigned-bugs>
Status: CLOSED DUPLICATE    
Severity: enhancement CC: Bert.Wesarg, djm
Priority: P5    
Version: 7.4p1   
Hardware: Other   
OS: All   

Description Christoph Anton Mitterer 2017-02-17 12:10:46 AEDT
Hey.

I've just noted the following, from a temporarily mounted fs e.g. /mnt/... I SSH'ed to some server and during that a mux process was spawned.

While the socket was in ~/.ssh/something, the mux process had still its CWD in /mnt/... and thus the fs couldn't be unmounted.


I'd guess the same happens in other cases where some ssh session is made and where it rather goes into a background-like operating schema, e.g. when setting up forwardings with -N and &.


Now the idea of this report would be, that it may be nice to change the CWD to e.g. / in such cases, though some expert should carefully consider whether this may have any side effects.
E.g. for everything in SSH where the CWD has an effect, this should probably NOT be done... scp/sftp is the obvious example, but there's also e.g. LocalCommand which may be affected by this (and perhaps also in the MUX case).

Cheers,
Chris.
Comment 1 Bert Wesarg 2017-02-17 20:56:53 AEDT
duplicate of 1902?
Comment 2 Damien Miller 2019-07-19 15:31:05 AEST

*** This bug has been marked as a duplicate of bug 1902 ***
Comment 3 Damien Miller 2021-04-23 15:08:41 AEST
closing resolved bugs as of 8.6p1 release