ssh + patch + $TMP
Larry Hall (Cygwin)
Thu Feb 18 21:02:00 GMT 2010
On 02/18/2010 03:52 PM, Corinna Vinschen wrote:
> On Feb 18 15:39, Charles Wilson wrote:
>> I ran across an interesting "feature" of remote access today. I was
>> ssh'ed in to my cygwin computer, under my normal windows/cygwin account
>> name, and tried to run 'patch':
>> $ patch -p1 -R --dry-run< ../some-patch.patch
>> patch: **** Can't create file
>> /c/Users/CYG_SE~1/AppData/Local/Temp/poFOD7WH : Not a directory
>> $ echo $TMP
>> $ echo $TEMP
>> $ echo $TMPDIR
>> Obviously, my regular user doesn't have access to cyg_server's AppData
>> directory. This is easily fixed, of course, by setting $TMP=/tmp (or
>> /c/Users/<me>/AppData/Local/Temp, if you like). The question is, should
>> this be something that is done by default in /etc/profile (e.g. part of
>> the base-files package)?
> In contrast to other systems, sshd for Cygwin preserves a couple of
> environment variables from the parent sshd process running under the
> cyg_server account. The list of preserved variables is:
> Is it time to reduce this list? Should sshd remove TMP and TEMP?
> Anything else?
I agree that TMP and TEMP should go. PATH and PATHEXT might be
nice to jettison. PATH might be problematic and is probably overwritten
typically, so if it has to stay, that may not be a big deal. PATHEXT is
likely in the same boat as PATH though far less important. Everything
else looks to me like stuff that would be the same for all users anyway.
Larry Hall http://www.rfk.com
RFK Partners, Inc. (508) 893-9779 - RFK Office
216 Dalton Rd. (508) 893-9889 - FAX
Holliston, MA 01746
> Q: Are you sure?
>> A: Because it reverses the logical flow of conversation.
>>> Q: Why is top posting annoying in email?
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
More information about the Cygwin