On 09/26/2018 09:07 AM, Michael Albinus wrote: > Jon SCHEWE <[email protected]> writes: > > Hi Jon, > >> I first visited the file >> /su:jschewe-adm@localhost|sudo:root@localhost:/etc/logcheck/ignore.d.server/local >> and made changes to it. I verified outside of emacs that this edited the >> file on my local system. >> >> I then asked emacs to visit the file >> /ssh:[email protected]|sudo:root@localhost:/etc/logcheck/ignore.d.server/local >> and was given the message >> >> /ssh:[email protected]|sudo:root@localhost:/etc/logcheck/ignore.d.server/local >> and >> /su:jschewe-adm@localhost|sudo:root@localhost:/etc/logcheck/ignore.d.server/local >> are the same file >> >> These are in fact not the same files, the second one is on a remote host. >> So the only way to edit this remote file appears to be to login to the >> host and edit it there rather than from my local system. > Well, you are using Tramp's ad-hoc syntax for multi-hop > files. Internally, Tramp is using just the tail of the multi-hops, so > there is the mapping > > /ssh:[email protected]|sudo:root@localhost:/etc/logcheck/ignore.d.server/local > => /sudo:root@localhost:/etc/logcheck/ignore.d.server/local > > /su:jschewe-adm@localhost|sudo:root@localhost:/etc/logcheck/ignore.d.server/local > => /sudo:root@localhost:/etc/logcheck/ignore.d.server/local > > And yes, Tramp regards them as the same file then. As work-around, I > recommend to use for the first file the file name > > /ssh:[email protected]|sudo:[email protected]:/etc/logcheck/ignore.d.server/local > > Tramp would understand then, that both files are different. Thank you for the quick reply. That does indeed work. > This problem is known, and solved already in Tramp 2.4, which will be > part of the upcoming Emacs 27. In an ad-hoc multi-hop file name, host > names must match for methods like "su", "sg", "sudo", "doas", and "ksu". > > So this requires that the hostname for the sudo must match the hostname for the ssh like you've given me in the URL above, correct?
-- Research Scientist Raytheon BBN Technologies 5775 Wayzata Blvd, Ste 630 Saint Louis Park, MN, 55416 Office: 952-545-5720 _______________________________________________ Tramp-devel mailing list [email protected] https://lists.gnu.org/mailman/listinfo/tramp-devel
