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,RCVD_IN_DNSWL_NONE,SARE_SPEC_REPLICA_OBFU |
X-Spam-Check-By: | sourceware.org |
X-Yahoo-SMTP: | Uu383n6swBCEN1G9up0WSnxbvN8fCPmk |
Message-ID: | <4CFEB363.5040205@cygwin.com> |
Date: | Tue, 07 Dec 2010 17:21:23 -0500 |
From: | "Larry Hall \(Cygwin\)" <reply-to-list-only-lh AT cygwin DOT com> |
Reply-To: | cygwin AT cygwin DOT com |
User-Agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.21) Gecko/20090320 Remi/2.0.0.21-1.fc8.remi Lightning/0.9 Thunderbird/2.0.0.21 Mnenhy/0.7.5.0 |
MIME-Version: | 1.0 |
To: | cygwin AT cygwin DOT com |
Subject: | Re: du -ks output different when run from command and when run on scheduled task |
References: | <AANLkTimKcDFUT7CS8xTaq4Qy6P9w8HVAO7J8U_Q96cg0 AT mail DOT gmail DOT com> |
In-Reply-To: | <AANLkTimKcDFUT7CS8xTaq4Qy6P9w8HVAO7J8U_Q96cg0@mail.gmail.com> |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.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 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 //comp/shares/ <snip> > The bat. file that schedules the bash script looks like this. The > 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 //s550-shop/shares/replica/Administration Yep. This is an age-old issue that really has to do with Windows permissions for services. The default user for services doesn't have permission to access network shares, even if you do. One option is to run the service as you. There are others. Read <http://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-setuid-overview> and the following sections for more background, details, and possible options. -- Larry Hall http://www.rfk.com RFK Partners, Inc. (508) 893-9779 - RFK Office 216 Dalton Rd. (508) 893-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: 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 |