delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-SWARE-Spam-Status: | No, hits=1.0 required=5.0 tests=AWL,BAYES_50,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SARE_SPEC_REPLICA_OBFU,T_TO_NO_BRKTS_FREEMAIL |
X-Spam-Check-By: | sourceware.org |
MIME-Version: | 1.0 |
In-Reply-To: | <4CFEB363.5040205@cygwin.com> |
References: | <AANLkTimKcDFUT7CS8xTaq4Qy6P9w8HVAO7J8U_Q96cg0 AT mail DOT gmail DOT com> <4CFEB363 DOT 5040205 AT cygwin DOT com> |
Date: | Wed, 8 Dec 2010 07:34:10 -0700 |
Message-ID: | <AANLkTimrdRH2rCbxNxmqUA_D9Dw-8naqPa-khNrR=rxF@mail.gmail.com> |
Subject: | Re: du -ks output different when run from command and when run on scheduled task |
From: | computer tech <comphandyman AT gmail DOT com> |
To: | cygwin AT cygwin DOT com |
X-IsSubscribed: | yes |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
On Tue, Dec 7, 2010 at 3:21 PM, Larry Hall (Cygwin) <reply-to-list-only-lh AT cygwin DOT com> wrote: > On 12/7/2010 4:10 PM, computer tech wrote: >> >> Greetings all I have run this set of commands directly from the cygwin >> command line. >> du -ks //comp/shares/ >> >> Ouput1: is correct >> 49939594 =A0 =A0 =A0 =A0//comp/shares/ > > <snip> > >> The bat. file that schedules the bash script looks like this. =A0The >> scheduled task runs at night and it works , it just outputs the wrong >> number. >> @echo off >> C:\cygwin\bin\bash.exe --login -c "/home/rod/Shop-fs2.sh" >> >> Output2: when script runs from scheduled tasks ; It just gives a 4, >> when the output is way more then 4. >> 4 =A0 =A0 =A0 //s550-shop/shares/replica/Administration > > Yep. =A0This is an age-old issue that really has to do with Windows > permissions > for services. =A0The default user for services doesn't have permission to > access network shares, even if you do. =A0One option is to run the service > as you. =A0There are others. =A0Read > > <http://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-setuid-overview> > > and the following sections for more background, details, and possible > options. Hi Larry, Thank you for your response. I read the link and a few of those items are a little over my head. If I try authenticating my self to the network in the following manner in the bash script net use '\\server\share' /user:DOMAIN\my_user my_users_password then use the share on the script like so du -ks \\server\share Will that traverse that share with the credentials used in the net use comm= and? > > -- > Larry Hall =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0htt= p://www.rfk.com > RFK Partners, Inc. =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(508) 893-9= 779 - RFK Office > 216 Dalton Rd. =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(508) 8= 93-9889 - FAX > Holliston, MA 01746 > > _____________________________________________________________________ > > A: Yes. >> >> Q: Are you sure? >>> >>> A: Because it reverses the logical flow of conversation. >>>> >>>> Q: Why is top posting annoying in email? > > -- > Problem reports: =A0 =A0 =A0 http://cygwin.com/problems.html > FAQ: =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 http://cygwin.com/faq/ > Documentation: =A0 =A0 =A0 =A0 http://cygwin.com/docs.html > Unsubscribe info: =A0 =A0 =A0http://cygwin.com/ml/#unsubscribe-simple > > -- 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
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |