Problem with bash script running under NT AUTHORITY\SYSTEM
Eliot Moss
moss@cs.umass.edu
Wed Dec 2 22:05:00 GMT 2009
Almo wrote:
> Hi!
>> I'm using cygwin and this command in a function works when I'm logged in as
> me:
>> gzip -f ./1ドル.sql 2>> error.log
>> so it zips hyperquest_v2.sql as the argument I send it is "hyperquest_v2".
>> When this is run from NT AUTHORITY\SYSTEM as a scheduled task, I get an
> error. So I put in some debug output: (I also have to specify where gzip.exe
> is so that account can find it, hence the "/usr/bin/" part)
>> echo "/usr/bin/gzip -f ./1ドル.sql 2>> error.log" >> error.log
> usr/bin/gzip -f ./1ドル.sql 2>> error.log
>> The output I get is:
>> hyperquest_v2.sql
> /usr/bin/gzip -f ./hyperquest_v2.sql 2>> error.log
> usr/bin/gzip: No such file or directory
Could it be that the current working directory (.) in
this scenario is not the one you think it is? It may be
some random place that the scheduled task is using ...
Maybe echo $PWD to see?
Regards -- Eliot Moss
--
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
More information about the Cygwin
mailing list