I am new to tramp and I am trying to edit a file stored in a remote server. I connect to the file through C-x C-f /ssh:username@host:path_to_file/myfile.m
. And on my init.el
I have the options: (setq tramp-default-method "ssh")
and (setq auto-save-file-name-transforms nil)
.
After editing the file and trying to save it (C-x C-s
), I get the following messages:
Saving file /ssh:username@host:/mypath/myfile.m...
Opening output file: No such file or directory, /ssh:username@host:/mypath/tramp.11638_lq.m
Problem: If I reopen the file I get the outdated version.
Question: Why can't I save the file with C-x C-s
? And why is emacs trying to save a file named tramp.11638_lq.m
?
Why is this happening and how can I fix it? Thanks for helping! :D
Edit 1: I connect to the server via /ssh:root@ip:/pathtofile/test.org
, and debugging tramp while trying to save this file gives me this
10:50:58.242647 tramp-do-file-attributes-with-perl (5) # file attributes with perl: /Users/guilhermesalome/test.org
10:50:58.242811 tramp-send-command (6) # tramp_perl_file_attributes /Users/guilhermesalome/test.org integer 2>/dev/null; echo tramp_exit_status $?
10:50:58.271392 tramp-wait-for-regexp (6) #
(nil 1 0 20 (23405 40366) (23401 56356) (23401 56356) 6.0 33188 t (23 . 40963) -1)
tramp_exit_status 0
///ae57c2b1a4c9c01ffc0931388f49cffb#$
10:50:58.273742 tramp-send-command (6) # test -e /Users/guilhermesalome/ 2>/dev/null; echo tramp_exit_status $?
10:50:58.298278 tramp-wait-for-regexp (6) #
tramp_exit_status 0
///ae57c2b1a4c9c01ffc0931388f49cffb#$
10:50:58.300366 tramp-do-file-attributes-with-perl (5) # file attributes with perl: /Users/guilhermesalome/test.org
10:50:58.300588 tramp-send-command (6) # tramp_perl_file_attributes /Users/guilhermesalome/test.org string 2>/dev/null; echo tramp_exit_status $?
10:50:58.327907 tramp-wait-for-regexp (6) #
(nil 1 "root" "dialout" (23405 40366) (23401 56356) (23401 56356) 6.0 33188 t (23 . 40963) -1)
tramp_exit_status 0
///ae57c2b1a4c9c01ffc0931388f49cffb#$
10:50:58.331693 tramp-send-command (6) # tramp_perl_file_name_all_completions /Users/guilhermesalome/
10:50:58.406682 tramp-wait-for-regexp (6) #
../
test.org
test.org~
./
ok
///ae57c2b1a4c9c01ffc0931388f49cffb#$
10:50:58.407878 tramp-sh-handle-file-truename (4) # Finding true name for ‘/ssh:[email protected]:/Users/guilhermesalome/test.org’
10:50:58.408037 tramp-send-command (6) # \readlink --canonicalize-missing /Users/guilhermesalome/test.org 2>/dev/null; echo tramp_exit_status $?
10:50:58.433204 tramp-wait-for-regexp (6) #
/Users/guilhermesalome/test.org
tramp_exit_status 0
///ae57c2b1a4c9c01ffc0931388f49cffb#$
10:50:58.434297 tramp-sh-handle-file-truename (4) # True name of ‘/Users/guilhermesalome/test.org’ is ‘/Users/guilhermesalome/test.org’
10:50:58.435968 tramp-send-command (6) # getfacl / 2>/dev/null; echo tramp_exit_status $?
10:50:58.461641 tramp-wait-for-regexp (6) #
# file: .
# owner: root
# group: root
user::rwx
group::rwx
other::r-x
tramp_exit_status 0
///ae57c2b1a4c9c01ffc0931388f49cffb#$
10:50:58.462045 tramp-send-command (6) # getfacl -ac /Users/guilhermesalome/test.org 2>/dev/null; echo tramp_exit_status $?
10:50:58.488027 tramp-wait-for-regexp (6) #
user::rw-
group::r--
other::r--
tramp_exit_status 0
///ae57c2b1a4c9c01ffc0931388f49cffb#$
10:50:58.488945 tramp-send-command (6) # selinuxenabled 2>/dev/null; echo tramp_exit_status $?
10:50:58.513190 tramp-wait-for-regexp (6) #
tramp_exit_status 127
///ae57c2b1a4c9c01ffc0931388f49cffb#$
10:50:58.515428 tramp-do-file-attributes-with-perl (5) # file attributes with perl: /Users/guilhermesalome/
10:50:58.515669 tramp-send-command (6) # tramp_perl_file_attributes /Users/guilhermesalome/ string 2>/dev/null; echo tramp_exit_status $?
10:50:58.542839 tramp-wait-for-regexp (6) #
(t 2 "root" "root" (23405 42406) (23405 42346) (23405 42346) 4096.0 16877 t (23 . 40962) -1)
tramp_exit_status 0
///ae57c2b1a4c9c01ffc0931388f49cffb#$
10:50:58.544147 tramp-do-file-attributes-with-perl (5) # file attributes with perl: /Users/guilhermesalome/
10:50:58.544389 tramp-send-command (6) # tramp_perl_file_attributes /Users/guilhermesalome/ integer 2>/dev/null; echo tramp_exit_status $?
10:50:58.571390 tramp-wait-for-regexp (6) #
(t 2 0 0 (23405 42406) (23405 42346) (23405 42346) 4096.0 16877 t (23 . 40962) -1)
tramp_exit_status 0
///ae57c2b1a4c9c01ffc0931388f49cffb#$
10:50:58.574580 tramp-send-command (6) # test -d /Users/guilhermesalome/test.org 2>/dev/null; echo tramp_exit_status $?
10:50:58.598908 tramp-wait-for-regexp (6) #
tramp_exit_status 1
///ae57c2b1a4c9c01ffc0931388f49cffb#$
10:50:58.601656 tramp-do-copy-or-rename-file (0) # Copying /ssh:[email protected]:/Users/guilhermesalome/test.org to /ssh:[email protected]:/Users/guilhermesalome/test.org~...
10:50:58.605603 tramp-send-command (6) # cp -f -p /Users/guilhermesalome/test.org /Users/guilhermesalome/test.org\~ 2>/dev/null; echo tramp_exit_status $?
10:50:58.631692 tramp-wait-for-regexp (6) #
tramp_exit_status 0
///ae57c2b1a4c9c01ffc0931388f49cffb#$
10:50:58.633161 tramp-send-command (6) # env TZ=UTC \touch -t 201808071751.32 /Users/guilhermesalome/test.org\~ 2>/dev/null; echo tramp_exit_status $?
10:50:58.658243 tramp-wait-for-regexp (6) #
tramp_exit_status 0
///ae57c2b1a4c9c01ffc0931388f49cffb#$
10:50:58.659226 tramp-send-command (6) # chmod 644 /Users/guilhermesalome/test.org\~ 2>/dev/null; echo tramp_exit_status $?
10:50:58.684330 tramp-wait-for-regexp (6) #
tramp_exit_status 0
///ae57c2b1a4c9c01ffc0931388f49cffb#$
10:50:58.685627 tramp-do-copy-or-rename-file (0) # Copying /ssh:[email protected]:/Users/guilhermesalome/test.org to /ssh:[email protected]:/Users/guilhermesalome/test.org~...done
10:50:58.686703 tramp-send-command (6) # setfacl --set-file=- /Users/guilhermesalome/test.org\~ <<'82abb4c70752cb3ab3e23e781c74e270'
user::rw-
group::r--
other::r--
82abb4c70752cb3ab3e23e781c74e270
10:50:58.712340 tramp-wait-for-regexp (6) #
///ae57c2b1a4c9c01ffc0931388f49cffb#$
10:50:58.712732 tramp-send-command (6) # echo tramp_exit_status $?
10:50:58.737094 tramp-wait-for-regexp (6) #
tramp_exit_status 0
///ae57c2b1a4c9c01ffc0931388f49cffb#$
10:50:58.739244 tramp-send-command (6) # test -e /Users/guilhermesalome/ 2>/dev/null; echo tramp_exit_status $?
10:50:58.763746 tramp-wait-for-regexp (6) #
tramp_exit_status 0
///ae57c2b1a4c9c01ffc0931388f49cffb#$
10:50:58.764897 tramp-do-file-attributes-with-perl (5) # file attributes with perl: /Users/guilhermesalome/
10:50:58.765132 tramp-send-command (6) # tramp_perl_file_attributes /Users/guilhermesalome/ string 2>/dev/null; echo tramp_exit_status $?
10:50:58.793686 tramp-wait-for-regexp (6) #
(t 2 "root" "root" (23405 42406) (23405 42346) (23405 42346) 4096.0 16877 t (23 . 40962) -1)
tramp_exit_status 0
///ae57c2b1a4c9c01ffc0931388f49cffb#$
10:50:58.794940 tramp-do-file-attributes-with-perl (5) # file attributes with perl: /Users/guilhermesalome/
10:50:58.795185 tramp-send-command (6) # tramp_perl_file_attributes /Users/guilhermesalome/ integer 2>/dev/null; echo tramp_exit_status $?
10:50:58.821953 tramp-wait-for-regexp (6) #
(t 2 0 0 (23405 42406) (23405 42346) (23405 42346) 4096.0 16877 t (23 . 40962) -1)
tramp_exit_status 0
///ae57c2b1a4c9c01ffc0931388f49cffb#$
10:51:18.933723 tramp-sh-handle-file-truename (4) # Finding true name for ‘/ssh:[email protected]:/Users/guilhermesalome/test.org’
10:51:18.933872 tramp-send-command (6) # \readlink --canonicalize-missing /Users/guilhermesalome/test.org 2>/dev/null; echo tramp_exit_status $?
10:51:18.960843 tramp-wait-for-regexp (6) #
/Users/guilhermesalome/test.org
tramp_exit_status 0
///ae57c2b1a4c9c01ffc0931388f49cffb#$
10:51:18.962644 tramp-do-file-attributes-with-perl (5) # file attributes with perl: /Users/guilhermesalome/test.org
10:51:18.963585 tramp-send-command (6) # tramp_perl_file_attributes /Users/guilhermesalome/test.org integer 2>/dev/null; echo tramp_exit_status $?
10:51:18.990091 tramp-wait-for-regexp (6) #
(nil 1 0 20 (23405 40366) (23401 56356) (23401 56356) 6.0 33188 t (23 . 40963) -1)
tramp_exit_status 0
///ae57c2b1a4c9c01ffc0931388f49cffb#$
10:51:18.990493 tramp-sh-handle-file-truename (4) # True name of ‘/Users/guilhermesalome/test.org’ is ‘/Users/guilhermesalome/test.org’
Edit 2: I am on GNU Emacs 26.1 on Mac OS high sierra, and there is not init.el
besides the following
(setq tramp-default-method "ssh"
tramp-auto-save-directory "~/tmp/tramp/"
tramp-chunk-size 2000
tramp-default-user "root"
tramp-verbose 6)
emacs -Q
and see, whether the problem still persist. If not (that's what I expect), bisect your.emacs
in order to see what's up.