public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Problem with ssh in non-interactive mode and mapped drives
@ 2011-11-28 16:30 Costin Caraivan
  2011-11-28 17:20 ` Costin Caraivan
  2011-11-28 18:40 ` Andrey Repin
  0 siblings, 2 replies; 3+ messages in thread
From: Costin Caraivan @ 2011-11-28 16:30 UTC (permalink / raw)
  To: cygwin

Hello,

I have a mapped drive pointing to a Windows network share. In this
share I have several files for which I'm checking the MD5 with this
command:
if [ `/bin/cat /cygdrive/z/builds/latest/PROJECT.MD5 | grep PROJECT_TM
| cut -f 1 -d " "` ==
`md5sum.exe /cygdrive/z/builds/latest/PROJECT_TM.zip | cut -f 1 -d "
"` ]; then echo "PROJECT_TM package MD5 matched expected MD5."; else
echo "PROJECT_TM package MD5 did not match expected MD5: `/bin/cat
/cygdrive/z/builds/latest/PROJECT.MD5 | grep PROJECT_TM | cut -f 1 -d
" "`"; exit -2; fi

PROJECT_TM package MD5 matched expected MD5.


When running the command interactively, everything is ok:
PROJECT_TM package MD5 matched expected MD5.

When running the command non-interactively, with this: ssh
PROJECTctier@LOCATIONsd-vm-admin.PROJECT.COMPANY.com 'COMMAND', I get
this:
No such file: /cygdrive/z/builds/latest/PROJECT_TM.zip
bash: line 0: [: c3e3cb8bb6b7b07915755ba8d242fa56: unary operator expected
PROJECT_TM package MD5 did not match expected MD5:
c3e3cb8bb6b7b07915755ba8d242fa56
Connection to LOCATIONsd-vm-admin.PROJECT.COMPANY.com closed.

I tried ssh -t, ssh -tt, same thing happens.

Got any idea why the file is not found in non-interactive mode?
Further information:
uname -srv
CYGWIN_NT-6.0-WOW64 1.7.9(0.237/5/3) 2011-03-29 10:10

mount
Z: on /cygdrive/z type netapp (binary,posix=0,user,noumount,auto)

ls -lah /cygdrive/z/builds/latest/PROJECT_TM.zip
-rwxrwx--- 1 Administrators Domain Users 25M Nov 29 00:26
/cygdrive/z/builds/latest/PROJECT_TM.zip


I'm kinda stumped (still digging though) :(
_____________
Costin Caraivan

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Problem with ssh in non-interactive mode and mapped drives
  2011-11-28 16:30 Problem with ssh in non-interactive mode and mapped drives Costin Caraivan
@ 2011-11-28 17:20 ` Costin Caraivan
  2011-11-28 18:40 ` Andrey Repin
  1 sibling, 0 replies; 3+ messages in thread
From: Costin Caraivan @ 2011-11-28 17:20 UTC (permalink / raw)
  To: cygwin

Scratch that. I'm launching Cygwin command on a Windows 2008 machine
with lots of users, and the PATH is messed up beyond all recognition.

I'm now using the absolute paths of the tools and everything works as expected.

Sorry for the spam.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Problem with ssh in non-interactive mode and mapped drives
  2011-11-28 16:30 Problem with ssh in non-interactive mode and mapped drives Costin Caraivan
  2011-11-28 17:20 ` Costin Caraivan
@ 2011-11-28 18:40 ` Andrey Repin
  1 sibling, 0 replies; 3+ messages in thread
From: Andrey Repin @ 2011-11-28 18:40 UTC (permalink / raw)
  To: Costin Caraivan, cygwin

Greetings, Costin Caraivan!

> When running the command non-interactively, with this: ssh
> PROJECTctier@LOCATIONsd-vm-admin.PROJECT.COMPANY.com 'COMMAND', I get
> this:
> No such file: /cygdrive/z/builds/latest/PROJECT_TM.zip
> bash: line 0: [: c3e3cb8bb6b7b07915755ba8d242fa56: unary operator expected
> PROJECT_TM package MD5 did not match expected MD5:
> c3e3cb8bb6b7b07915755ba8d242fa56
> Connection to LOCATIONsd-vm-admin.PROJECT.COMPANY.com closed.

> I tried ssh -t, ssh -tt, same thing happens.

> Got any idea why the file is not found in non-interactive mode?

Your SSH session not aware of your drive mappings.
Either do your mapping in startup script or use UNC path.


--
WBR,
Andrey Repin (anrdaemon@freemail.ru) 28.11.2011, <21:04>

Sorry for my terrible english...


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-11-28 17:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-28 16:30 Problem with ssh in non-interactive mode and mapped drives Costin Caraivan
2011-11-28 17:20 ` Costin Caraivan
2011-11-28 18:40 ` Andrey Repin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).