tramp-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Re: tramp (2.2.13.25.2); emacs thinks 2 files are the same and they


From: Jon SCHEWE
Subject: Re: Re: tramp (2.2.13.25.2); emacs thinks 2 files are the same and they are not
Date: Wed, 26 Sep 2018 15:11:26 +0000

On 09/26/2018 09:07 AM, Michael Albinus wrote:
> Jon SCHEWE <address@hidden> writes:
>
> Hi Jon,
>
>> I first visited the file
>> /su:address@hidden|sudo:address@hidden:/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:address@hidden|sudo:address@hidden:/etc/logcheck/ignore.d.server/local
>> and was given the message
>>
>> /ssh:address@hidden|sudo:address@hidden:/etc/logcheck/ignore.d.server/local
>> and
>> /su:address@hidden|sudo:address@hidden:/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:address@hidden|sudo:address@hidden:/etc/logcheck/ignore.d.server/local
> => /sudo:address@hidden:/etc/logcheck/ignore.d.server/local
>
> /su:address@hidden|sudo:address@hidden:/etc/logcheck/ignore.d.server/local
> => /sudo:address@hidden:/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:address@hidden|sudo:address@hidden:/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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]