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.
--bug report follows this line--

>> Some files come with their permission preserved, although when I C-x
>> C-s, I get a final error msg:
>> 
>> $  2>/dev/nullecho tramp_exit_status $?
>> /bin/ksh: /dev/nullecho: cannot create: Permission denied

>Could you try this patch? If it works fine, I will commit it.

>--- tramp.el.orig       Thu May 24 17:30:22 2001
>+++ tramp.el    Thu May 24 17:30:47 2001
>@@ -3802,7 +3802,7 @@
>   (tramp-send-command multi-method method user host
>                       (concat (if subshell "( " "")
>                               command " 2>/dev/null"
>-                              (if command " ; " "")
>+                              (if command " ; " " ")
>                               "echo tramp_exit_status $?"
>                               (if subshell " )" "")))
>   (tramp-wait-for-output)


Seems to work ...

>> I have write permission on the remote file, but emacs loads the buffer
>> w/ read-only permission.  Here are the tramp_file_attributes from the
>> debug-buffer:
>> 
>> $ tramp_file_attributes /home/mh2/modules/diag_manager/diag_output.f90
>> (nil 1 2137 69 (15116 34555) (15116 32356) (15116 32944) 22482 33188 t
>> (8 . 38854) (24 10))

>> (I have no idea what this means ...)

>33188 is the file's mode and it means "-rw-r--r--". 
>I don't know why it doesn't work. Could you send us to the contents 
>of debug-buffer?

mh2 logged in to vb (sgi4d) on /dev/ttyq10.
Graphics is NCAR CGM metafiles
mh2@vb% # Initializing remote shell
$ exec /bin/sh
# Waiting 30s for remote `/bin/sh' to come up...
exec /bin/sh
$ # Setting up remote shell environment
stty -inlcr -echo
$ $ # Determining coding system
foo
bar
$ # Waiting 30s for `HISTFILE=$HOME/.tramp_history; HISTSIZE=1'
$ # Waiting 30s for `set +o vi +o emacs'
$ # Waiting 30s for `unset MAIL MAILCHECK MAILPATH'
$ # Waiting 30s for `unset CDPATH'
$ # Setting shell prompt
$ PS1='
/////
'; PS2=''; PS3=''
$ echo hello
# Waiting for remote `/bin/sh' to come up...
hello
# Waiting for remote `/bin/sh' to come up...done
$ echo ~root
~root
$ while read d; do if test -x $d/ksh -a -f $d/ksh; then echo tramp_executable $d/ksh; 
break; fi; done <<'EOF'
$ /bin

$ /usr/bin

$ /usr/sbin

$ /usr/local/bin

$ /usr/ccs/bin

$ /local/bin

$ /local/freeware/bin

$ /local/gnu/bin

$ /usr/freeware/bin

$ /usr/pkg/bin

$ EOF

tramp_executable /bin/ksh

/////
# Starting remote shell `/bin/ksh' for tilde expansion...
$ PS1='$ ' ; exec /bin/ksh
$ $ echo hello
# Waiting for remote `/bin/ksh' to start up...
hello
# Waiting for remote `/bin/ksh' to start up...done
# Finding command to check if file exists
$ ls -d / 2>/dev/null ; echo tramp_exit_status $?
/
tramp_exit_status 0
$ ls -d /\ this\ file\ does\ not\ exist\  2>/dev/null ; echo tramp_exit_status $?
tramp_exit_status 2
# Finding a suitable `ls' command
# Checking remote `/bin/ls' command for `-n' option
$ test -x /bin/ls 2>/dev/null ; echo tramp_exit_status $?
tramp_exit_status 0
# Testing remote command `/bin/ls' for -n...
$ /bin/ls -lnd / >/dev/null 2>/dev/null ; echo tramp_exit_status $?
tramp_exit_status 0
# Testing remote command `/bin/ls' for -n...okay
# Using remote command `/bin/ls' for getting directory listings
$ tramp_set_exit_status () {
return $1
}
$ ls -d /bin 2>/dev/null ; echo tramp_exit_status $?
/bin
tramp_exit_status 0
$ ( test -d /bin 2>/dev/null ; echo tramp_exit_status $? )
tramp_exit_status 0
$ ls -d /usr/bin 2>/dev/null ; echo tramp_exit_status $?
/usr/bin
tramp_exit_status 0
$ ( test -d /usr/bin 2>/dev/null ; echo tramp_exit_status $? )
tramp_exit_status 0
$ ls -d /usr/sbin 2>/dev/null ; echo tramp_exit_status $?
/usr/sbin
tramp_exit_status 0
$ ( test -d /usr/sbin 2>/dev/null ; echo tramp_exit_status $? )
tramp_exit_status 0
$ ls -d /usr/local/bin 2>/dev/null ; echo tramp_exit_status $?
/usr/local/bin
tramp_exit_status 0
$ ( test -d /usr/local/bin 2>/dev/null ; echo tramp_exit_status $? )
tramp_exit_status 0
$ ls -d /usr/ccs/bin 2>/dev/null ; echo tramp_exit_status $?
tramp_exit_status 2
$ ls -d /local/bin 2>/dev/null ; echo tramp_exit_status $?
tramp_exit_status 2
$ ls -d /local/freeware/bin 2>/dev/null ; echo tramp_exit_status $?
tramp_exit_status 2
$ ls -d /local/gnu/bin 2>/dev/null ; echo tramp_exit_status $?
tramp_exit_status 2
$ ls -d /usr/freeware/bin 2>/dev/null ; echo tramp_exit_status $?
/usr/freeware/bin
tramp_exit_status 0
$ ( test -d /usr/freeware/bin 2>/dev/null ; echo tramp_exit_status $? )
tramp_exit_status 0
$ ls -d /usr/pkg/bin 2>/dev/null ; echo tramp_exit_status $?
tramp_exit_status 2
$ PATH=/bin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/freeware/bin; export PATH
$ LC_TIME=C; export LC_TIME; echo huhu
huhu
$ mesg n; echo huhu
huhu
$ biff n ; echo huhu
/bin/ksh: biff:  not found
huhu
$ unalias ls; echo huhu
huhu
$ test / -nt /
$ tramp_test_nt () {
test -n "`find $1 -prune -newer $2 -print`"
}
$ while read d; do if test -x $d/perl5 -a -f $d/perl5; then echo tramp_executable 
$d/perl5; break; fi; done <<'EOF'
$ /bin

$ /usr/bin

$ /usr/sbin

$ /usr/local/bin

$ /usr/ccs/bin

$ /local/bin

$ /local/freeware/bin

$ /local/gnu/bin

$ /usr/freeware/bin

$ /usr/pkg/bin

$ EOF

tramp_executable /bin/perl5

/////
# Sending the Perl `file-attributes' implementation.
$ tramp_file_attributes () {
/bin/perl5 -e '$f = $ARGV[0];
@s = lstat($f);
if (($s[2] & 0170000) == 0120000) { $l = readlink($f); $l = "\"$l\""; }
elsif (($s[2] & 0170000) == 040000) { $l = "t"; }
else { $l = "nil" };
printf("(%s %u %u %u (%u %u) (%u %u) (%u %u) %u %u t (%u . %u) (%u %u))\n",
$l, $s[3], $s[4], $s[5], $s[8] >> 16 & 0xffff, $s[8] & 0xffff,
$s[9] >> 16 & 0xffff, $s[9] & 0xffff, $s[10] >> 16 & 0xffff, $s[10] & 0xffff,
$s[7], $s[2], $s[1] >> 16 & 0xffff, $s[1] & 0xffff, $s[0] >> 16 & 0xffff, $s[0] & 
0xffff);' $1 2>/dev/null
}
$ while read d; do if test -x $d/ln -a -f $d/ln; then echo tramp_executable $d/ln; 
break; fi; done <<'EOF'
$ /bin

$ /usr/bin

$ /usr/sbin

$ /usr/local/bin

$ /usr/ccs/bin

$ /local/bin

$ /local/freeware/bin

$ /local/gnu/bin

$ /usr/freeware/bin

$ /usr/pkg/bin

$ EOF

tramp_executable /bin/ln

/////
$ ( test -d /net/mh2/modules/diag_manager 2>/dev/null ; echo tramp_exit_status $? )
tramp_exit_status 0
$ ( test -d /net/mh2/modules/diag_manager 2>/dev/null ; echo tramp_exit_status $? )
tramp_exit_status 0
# Inserting directory `ls -al /r@sm1:[EMAIL PROTECTED]:/net/mh2/modules/diag_manager/', 
wildcard no, fulldir yes
$ /bin/ls -al /net/mh2/modules/diag_manager/
total 356
drwxr-xr-x    3 mh2      e            512 May 23 23:22 .
drwxr-xr-x   22 mh2      e            512 May  8 07:18 ..
-rw-r--r--    1 mh2      e           4268 Mar 13 10:35 .doc.log
-rw-r--r--    1 mh2      e              0 May  5 16:43 .list_paths.doc.lst
-rw-r--r--    1 mh2      e              0 May  5 16:43 .list_paths.src.lst
drwxr-xr-x    2 mh2      e            512 May  5 16:46 CVS
-rw-r--r--    1 mh2      e          11223 May 23 14:45 diag_axis.f90
-rw-r--r--    1 mh2      e          49717 May  5 16:46 diag_manager.f90
-rw-r--r--    1 mh2      e          34812 May 22 14:32 diag_manager.html
-rw-r--r--    1 mh2      e          34382 Mar  6 21:18 diag_manager.html~
-rw-r--r--    1 mh2      e          22482 May 23 23:22 diag_output.f90
-rw-r--r--    1 mh2      e          22482 May 23 14:45 diag_output.f90~
-rw-r--r--    1 mh2      e              0 May  5 16:43 path_names
$ ls -d /net/mh2/modules/diag_manager/ 2>/dev/null ; echo tramp_exit_status $?
/net/mh2/modules/diag_manager/
tramp_exit_status 0
$ tramp_file_attributes /net/mh2/modules/diag_manager/
(t 3 2137 69 (15117 12180) (15116 32352) (15116 32352) 512 16877 t (8 . 36245) (24 9))
$ ls -d /net/mh2/modules/diag_manager/diag_output.f90 2>/dev/null ; echo 
tramp_exit_status $?
/net/mh2/modules/diag_manager/diag_output.f90
tramp_exit_status 0
$ ( test -d /net/mh2/modules/diag_manager/diag_output.f90 2>/dev/null ; echo 
tramp_exit_status $? )
tramp_exit_status 1
$ ls -d /net 2>/dev/null ; echo tramp_exit_status $?
/net
tramp_exit_status 0
$ tramp_file_attributes /net
(t 1 0 0 (15108 14558) (15108 14558) (15108 14558) 512 16749 t (0 . 13) (24 6))
$ ls -d /net/mh2 2>/dev/null ; echo tramp_exit_status $?
/net/mh2
tramp_exit_status 0
$ tramp_file_attributes /net/mh2
("/tmp_mnt/net/mh2" 1 0 0 (15117 35571) (15117 35571) (15117 35571) 16 41471 t (0 . 
27) (24 6))
$ ls -d /net 2>/dev/null ; echo tramp_exit_status $?
/net
tramp_exit_status 0
$ tramp_file_attributes /net
(t 1 0 0 (15108 14558) (15108 14558) (15108 14558) 512 16749 t (0 . 13) (24 6))
$ ls -d /net/mh2 2>/dev/null ; echo tramp_exit_status $?
/net/mh2
tramp_exit_status 0
$ tramp_file_attributes /net/mh2
("/tmp_mnt/net/mh2" 1 0 0 (15117 35571) (15117 35571) (15117 35571) 16 41471 t (0 . 
27) (24 6))
$ ls -d /net/mh2/modules/diag_manager/diag_output.f90 2>/dev/null ; echo 
tramp_exit_status $?
/net/mh2/modules/diag_manager/diag_output.f90
tramp_exit_status 0
$ ls -d /net/mh2/modules/diag_manager/diag_output.f90 2>/dev/null ; echo 
tramp_exit_status $?
/net/mh2/modules/diag_manager/diag_output.f90
tramp_exit_status 0
# Encoding remote file 
/r@sm1:[EMAIL PROTECTED]:/net/mh2/modules/diag_manager/diag_output.f90...
$ mimencode -b < /net/mh2/modules/diag_manager/diag_output.f90 2>/dev/null ; echo 
tramp_exit_status $?
......
tramp_exit_status 0
# Decoding remote file 
/r@sm1:[EMAIL PROTECTED]:/net/mh2/modules/diag_manager/diag_output.f90...
# Decoding remote file 
/r@sm1:[EMAIL PROTECTED]:/net/mh2/modules/diag_manager/diag_output.f90 with function 
base64-decode-region...
# Decoding remote file 
/r@sm1:[EMAIL PROTECTED]:/net/mh2/modules/diag_manager/diag_output.f90...done
$ ls -d /net/mh2/modules/diag_manager/diag_output.f90 2>/dev/null ; echo 
tramp_exit_status $?
/net/mh2/modules/diag_manager/diag_output.f90
tramp_exit_status 0
$ test -w /net/mh2/modules/diag_manager/diag_output.f90 2>/dev/null ; echo 
tramp_exit_status $?
tramp_exit_status 0
$ ls -d /net/mh2/modules/diag_manager/RCS/diag_output.f90\,v 2>/dev/null ; echo 
tramp_exit_status $?
tramp_exit_status 2
$ ls -d /net/mh2/modules/diag_manager/diag_output.f90\,v 2>/dev/null ; echo 
tramp_exit_status $?
tramp_exit_status 2
$ ls -d /net/mh2/modules/diag_manager/RCS/diag_output.f90 2>/dev/null ; echo 
tramp_exit_status $?
tramp_exit_status 2
$ ls -d /net/mh2/modules/diag_manager/SCCS/s.diag_output.f90 2>/dev/null ; echo 
tramp_exit_status $?
tramp_exit_status 2
$ ls -d /net/mh2/modules/diag_manager/s.diag_output.f90 2>/dev/null ; echo 
tramp_exit_status $?
tramp_exit_status 2
$ ( test -d /net/mh2/modules/diag_manager/CVS 2>/dev/null ; echo tramp_exit_status $? )
tramp_exit_status 0
$ test -r /net/mh2/modules/diag_manager/CVS/Entries 2>/dev/null ; echo 
tramp_exit_status $?
tramp_exit_status 0
$ ls -d /net/mh2/modules/diag_manager/CVS/Entries 2>/dev/null ; echo tramp_exit_status 
$?
/net/mh2/modules/diag_manager/CVS/Entries
tramp_exit_status 0
$ ls -d /net/mh2/modules/diag_manager/CVS/Entries 2>/dev/null ; echo tramp_exit_status 
$?
/net/mh2/modules/diag_manager/CVS/Entries
tramp_exit_status 0
$ ls -d /net/mh2/modules/diag_manager/CVS/Entries 2>/dev/null ; echo tramp_exit_status 
$?
/net/mh2/modules/diag_manager/CVS/Entries
tramp_exit_status 0
# Encoding remote file 
/r@sm1:[EMAIL PROTECTED]:/net/mh2/modules/diag_manager/CVS/Entries...
$ mimencode -b < /net/mh2/modules/diag_manager/CVS/Entries 2>/dev/null ; echo 
tramp_exit_status $?
...
tramp_exit_status 0
# Decoding remote file 
/r@sm1:[EMAIL PROTECTED]:/net/mh2/modules/diag_manager/CVS/Entries...
# Decoding remote file 
/r@sm1:[EMAIL PROTECTED]:/net/mh2/modules/diag_manager/CVS/Entries with function 
base64-decode-region...
# Decoding remote file 
/r@sm1:[EMAIL PROTECTED]:/net/mh2/modules/diag_manager/CVS/Entries...done
$ ls -d /net/mh2/modules/diag_manager/ 2>/dev/null ; echo tramp_exit_status $?
/net/mh2/modules/diag_manager/
tramp_exit_status 0
$ test -w /net/mh2/modules/diag_manager/ 2>/dev/null ; echo tramp_exit_status $?
tramp_exit_status 0
$ ls -d /net/mh2/modules/diag_manager/diag_output.f90 2>/dev/null ; echo 
tramp_exit_status $?
/net/mh2/modules/diag_manager/diag_output.f90
tramp_exit_status 0
$ tramp_file_attributes /net/mh2/modules/diag_manager/diag_output.f90
(nil 1 2137 69 (15117 12130) (15116 32356) (15116 32944) 22482 33188 t (8 . 38854) (24 
9))
$ ls -d /net/mh2/modules/diag_manager/diag_output.f90 2>/dev/null ; echo 
tramp_exit_status $?
/net/mh2/modules/diag_manager/diag_output.f90
tramp_exit_status 0
$ tramp_file_attributes /net/mh2/modules/diag_manager/diag_output.f90
(nil 1 2137 69 (15117 12130) (15116 32356) (15116 32944) 22482 33188 t (8 . 38854) (24 
9))
$ ls -d /net/mh2/modules/diag_manager/diag_output.f90 2>/dev/null ; echo 
tramp_exit_status $?
/net/mh2/modules/diag_manager/diag_output.f90
tramp_exit_status 0
$ tramp_file_attributes /net/mh2/modules/diag_manager/diag_output.f90
(nil 1 2137 69 (15117 12130) (15116 32356) (15116 32944) 22482 33188 t (8 . 38854) (24 
9))
$ ls -d /net/mh2/modules/diag_manager/diag_output.f90 2>/dev/null ; echo 
tramp_exit_status $?
/net/mh2/modules/diag_manager/diag_output.f90
tramp_exit_status 0
$ tramp_file_attributes /net/mh2/modules/diag_manager/diag_output.f90
(nil 1 2137 69 (15117 12130) (15116 32356) (15116 32944) 22482 33188 t (8 . 38854) (24 
9))



Emacs  : GNU Emacs 20.7.1 (i386-mandrake-linux-gnu, X toolkit)
 of Tue Apr  3 2001 on bi.mandrakesoft.com
Package: tramp ($Id: tramp.el,v 2.19 2001/05/02 22:15:29 grossjoh Exp $)

current state:
==============
(setq
 tramp-ls-command nil
 tramp-test-groks-nt nil
 tramp-file-exists-command nil
 tramp-current-multi-method nil
 tramp-current-method nil
 tramp-current-user nil
 tramp-current-host nil
 tramp-auto-save-directory "/tmp"
 tramp-default-method "sm1"
 tramp-rsh-end-of-line "\n"
 tramp-remote-path '("/bin" "/usr/bin" "/usr/sbin" "/usr/local/bin"
                     "/usr/ccs/bin" "/local/bin" "/local/freeware/bin"
                     "/local/gnu/bin" "/usr/freeware/bin" "/usr/pkg/bin")
 tramp-login-prompt-regexp ".*ogin: *$"
 tramp-password-prompt-regexp "^.*\\([pP]assword\\|passphrase.*\\):? *$"
 tramp-wrong-passwd-regexp "^.*\\(Permission denied.\\|Login [Ii]ncorrect\\|Received 
signal [0-9]+\\|Connection \\(refused\\|closed\\)\\|Sorry, try again.\\|Name or 
service not known\\).*$"
 tramp-temp-name-prefix "tramp."
 tramp-file-name-structure 
'("\\`/r\\(@\\([a-zA-Z0-9]+\\)\\)?:\\(\\([-a-zA-Z0-9_#]+\\)@\\)?\\([-a-zA-Z0-9.]+\\):\\(.*\\)\\'"
 2 4 5 6)
 tramp-file-name-regexp "\\`/r[@:]"
 tramp-make-tramp-file-format "/r@%m:%u@%h:%p"
 tramp-end-of-output "/////"
 shell-prompt-pattern "^[^#$%>\n]*[#$%>] *"
 backup-by-copying nil
 backup-by-copying-when-linked nil
 backup-by-copying-when-mismatch nil
 nil nil
 )

Reply via email to