Josh Howard | 6 Jun 2009 00:55

tramp (2.1.15); Unable to save remote files


Enter your bug report in this message, including as much detail
as you possibly can about the problem, what you did to cause it
and what the local and remote machines are.

If you can give a simple set of instructions to make this bug
happen reliably, please include those.  Thank you for helping
kill bugs in Tramp.

Another useful thing to do is to put

  (setq tramp-verbose 8)

in the ~/.emacs file and to repeat the bug.  Then, include the
contents of the *tramp/foo* buffer and the *debug tramp/foo*
buffer in your bug report.

--bug report follows this line--

When attempting to save remote files (actually using ssh to localhost,
with keys) I cannot save the contents of the files. Most disturbingly,
if I do not have file-precious-flag set to t, it will actually remove
the file completely, even though Emacs, and its associated buffer, seem
to think that the file was written.

As listed below, this is a pretty fresh copy of Emacs out of CVS with
the tramp from that version. I also had an older version of tramp and
Emacs from early last year which displayed the same issue. I have tried
a few different things, like setting chunk size, remote shell and so
forth, but none of those things have any impact.
(Continue reading)

Michael Albinus | 6 Jun 2009 12:43
Picon
Picon
Gravatar

Re: tramp (2.1.15); Unable to save remote files

Josh Howard <jrh <at> zeppelin.net> writes:

> When attempting to save remote files (actually using ssh to localhost,
> with keys) I cannot save the contents of the files. Most disturbingly,
> if I do not have file-precious-flag set to t, it will actually remove
> the file completely, even though Emacs, and its associated buffer, seem
> to think that the file was written.
>
> As listed below, this is a pretty fresh copy of Emacs out of CVS with
> the tramp from that version. I also had an older version of tramp and
> Emacs from early last year which displayed the same issue. I have tried
> a few different things, like setting chunk size, remote shell and so
> forth, but none of those things have any impact.

The Tramp traces are written with level 5. Could you, please, set
`tramp-verbose' to at least 6? Then I can see sent commands, and
received messages.

> Thanks.

Best regards, Michael.
Josh Howard | 6 Jun 2009 20:39

Re: tramp (2.1.15); Unable to save remote files


Michael Albinus <michael.albinus <at> gmx.de> writes:

> The Tramp traces are written with level 5. Could you, please, set
> `tramp-verbose' to at least 6? Then I can see sent commands, and
> received messages.
>
>> Thanks.
>
> Best regards, Michael.

Attached with level 6.

Emacs  : GNU Emacs 23.0.94.1 (i386-unknown-freebsd6.3)
 of 2009-06-05 on dazed.zeppelin.net
Package: tramp (2.1.15)

current state:
==============
(setq
 tramp-current-method "sshx"
 tramp-current-user "cindy"
 tramp-current-host "localhost"
 tramp-auto-save-directory nil
 tramp-default-method "sshx"
 tramp-default-method-alist '((nil "%" "smb")
                              ("" "\\`\\(anonymous\\|ftp\\)\\'" "ftp")
                              ("\\`ftp\\." "" "ftp")
                              ("\\`localhost\\'" "\\`root\\'" "su"))
 tramp-default-host "dazed.zeppelin.net"
(Continue reading)

Michael Albinus | 7 Jun 2009 10:05
Picon
Picon
Gravatar

Re: tramp (2.1.16-pre); Detection of gvfs broken on MacOS

David Abrahams <dave <at> boostpro.com> writes:

Hi David,

I'm running on my open-bug-list. This one was still waiting.

> The enclosed patch to tramp.el fixes a problem that otherwise causes a
> seemingly endless stream of messages to appear on the console when TRAMP
> is loaded, or, if make install is used, causes TRAMP to fail loading
> because tramp-gvfs can't be found.  I've also included a patch for the
> corresponding clause in aclocal.m4, but I was unable to verify that the
> results of that test are actually being used anywhere.

I have committed a patch to Tramp CVS, which will improve the check for
tramp-gvfs. It is different from your proposal, because I don't want to
have D-Bus code in tramp.el.

Could you, please, check? I've tested it for Ubuntu 9.04 only.

Best regards, Michael.
Michael Albinus | 7 Jun 2009 11:57
Picon
Picon
Gravatar

Re: tramp (2.1.15); Unable to save remote files

Josh Howard <jrh <at> zeppelin.net> writes:

> Attached with level 6.

That shows the errors:

> 11:35:47 tramp-send-command (6) # mv -f /tmp/tramp.77957CZS.779571OM /home/cindy/tmp77957oEG
> 11:35:47 tramp-wait-for-regexp (6) # 
> mv: rename /tmp/tramp.77957CZS.779571OM to /home/cindy/tmp77957oEG: Operation not permitted
>
> ///bf5cadca259c1ffb0e3e0a02cd85b78d
> 11:35:47 tramp-send-command (6) # chown 1019:993 /home/cindy/tmp77957oEG
> 11:35:47 tramp-wait-for-regexp (6) # 
> chown: /home/cindy/tmp77957oEG: No such file or directory
>
> ///bf5cadca259c1ffb0e3e0a02cd85b78d
> 11:35:47 tramp-handle-write-region (0) # Wrote /sshx:cindy <at> localhost:/home/cindy/tmp77957oEG

However, I do not catch the real code sequence in Tramp. Could you,
please, enable call traces:

     (require 'trace)
     (dolist (elt (all-completions "tramp-" obarray 'functionp))
       (trace-function-background (intern elt)))
     (untrace-function 'tramp-read-passwd)

The resulting buffer *trace-output* would be helpful, then.
Michael Albinus | 7 Jun 2009 18:20
Picon
Picon
Gravatar

Re: tramp (2.1.15); Unable to save remote files

Michael Albinus <michael.albinus <at> gmx.de> writes:

> However, I do not catch the real code sequence in Tramp.

I've continued with analysis. There is some suspicious code in
tramp-do-copy-or-rename-file-directly, which I have fixed in both Tramp
and Emacs CVS. Could you, please, check, whether this fixes the problem
for you?

Best regards, Michael.
Josh Howard | 8 Jun 2009 00:27

Re: tramp (2.1.15); Unable to save remote files

Michael Albinus <michael.albinus <at> gmx.de> writes:

> I've continued with analysis. There is some suspicious code in
> tramp-do-copy-or-rename-file-directly, which I have fixed in both Tramp
> and Emacs CVS. Could you, please, check, whether this fixes the problem
> for you?

Yes, actually this does fix it, both with file-precious-flag t and
without. Thank you!

--

-- 
Josh Howard <jrh <at> zeppelin.net>
Bart Bunting | 13 Jun 2009 02:19
Picon
Favicon

multi hop syntax

Hi,

 

I am struggling with the  Tramp Default Proxies Alist setting.

 

I have simple things working like sudo on remote machines.  Having read the documentation and had a search through the list archives I still can’t quite understand enough to do what I’m trying to do.

 

I am hoping that if I explain it here someone may be able to assist me with the correct settings:

 

I have a group of machines which are only accessible by sshing to a host and then sudoing to root before sshing on to the final destination.

 

So if we say we have the machine proxyhost and a set of machines who are all called <machine>.vpn.

To get to somemachine.vpn I do the following:

 

Ssh to proxyhost

Sudo to root on proxyhost.

Ssh to somemachine.vpn.

 

I’ve been using the customize interface to set the Tramp Default Proxies Alist.

 

Could someone explain how it is possible to set things up so I can access files on somemachine.vpn using tramp.

 

Thanks in advance!

 

Bart

 

_______________________________________________
Tramp-devel mailing list
Tramp-devel <at> gnu.org
http://lists.gnu.org/mailman/listinfo/tramp-devel
Michael Albinus | 13 Jun 2009 10:23
Picon
Picon
Gravatar

Re: multi hop syntax

"Bart Bunting" <bart <at> ursys.com.au> writes:

> Hi,

Hi,

> I have a group of machines which are only accessible by sshing to a host and
> then sudoing to root before sshing on to the final destination.
>
> So if we say we have the machine proxyhost and a set of machines who are all
> called <machine>.vpn.
>
> To get to somemachine.vpn I do the following:
>
> Ssh to proxyhost
>
> Sudo to root on proxyhost.
>
> Ssh to somemachine.vpn.
>
> Could someone explain how it is possible to set things up so I can access
> files on somemachine.vpn using tramp.

You haven't mentioned the user name, let's assume you are working as
"bart". The following settings might work the for you:

(add-to-list 'tramp-default-proxies-alist
             '("\\.vpn\\'" "\\`bart\\'" "/sudo:root <at> proxyhost:"))
(add-to-list 'tramp-default-proxies-alist
             '("\\`proxyhost\\'" "\\`root\\'" "/ssh:bart <at> proxyhost:"))

If you open "/ssh:bart <at> somemachine.vpn:", the first rule is applied,
opening "/sudo:root <at> proxyhost:". And this requires at the beginning, due
to the second rule, opening "/ssh:bart <at> proxyhost:".

> Thanks in advance!
>
> Bart

Best regards, Michael.
Michael Albinus | 13 Jun 2009 10:43
Picon
Picon
Gravatar

Re: tramp (2.1.16-pre); Documentation for tramp-encoding-shell unclear

David Abrahams <dave <at> boostpro.com> writes:

Hi David,

this is an answer to an older mail from you; I'm cleaning my
not-yet-answered-issues-stack ...

> The documentation for tramp-encoding-shell states:
>
>   *Use this program for encoding and decoding commands on the local host.
>   This shell is used to execute the encoding and decoding command on the
>   local host, so if you want to use `~' in those commands, you should
>   choose a shell here which groks tilde expansion.  `/bin/sh' normally
>   does not understand tilde expansion.
>
>   For encoding and deocding, commands like the following are executed:
>
>       /bin/sh -c COMMAND < INPUT > OUTPUT
>
>   This variable can be used to change the "/bin/sh" part.  See the
>   variable `tramp-encoding-command-switch' for the "-c" part.
>
>   Note that this variable is not used for remote commands.  There are
>   mechanisms in tramp.el which automatically determine the right shell to
>   use for the remote host.
>
> So if it's not used for remote commands, what /is/ it used for?  I would
> like an example, please, because "the encoding and decoding command on
> the local host" is still to vague to me.  It's hard to decide "if I want
> to use `~' in those commands" without being able to tell which "those
> commands" are.

The documentaion is related to *inline* methods, like ssh. If you want
to copy a file from a remote machine to a local machine, Tramp encodes
the file on the remote machine with base64 or uuencode; the (ASCII)
output of this encoding goes to an Emacs buffer.

Afterwards, a process on the local machine is started, with
`tramp-encoding-shell' as the surrounding shell. This process gets the
above buffer as input, and decodes it to the resulting file with the
opposite command.

> Thanks

Best regards, Michael.

Gmane