X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_NO,RCVD_IN_HOSTKARMA_YE,TW_ZR X-Spam-Check-By: sourceware.org From: Guy Harrison To: cygwin AT cygwin DOT com Subject: Windows 7, cron, permissions Date: Mon, 28 May 2012 15:11:12 +0100 User-Agent: KMail/1.9.9 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <201205281511.12906.swampdog@ntlworld.com> Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Hi Folks, The actual fault lies in 'cj-defrag' where 'cjx' mails the output of 'cj-defrag'. 'cj-defrag' calls a child script 'sd-defrag' and all 'sd-defrag' does is call "df.exe". The single line at the bottom simplifies the problem: do a quick defrag of the E: drive. The other issue was $TMP being set to somewhere unwritable. This is a work machine so I'm assuming it's some daft policy setting. Setting TMP to "/tmp" fixed that. $ crontab -l # DO NOT EDIT THIS FILE - edit the master and reinstall. # (/tmp/crontab.Uu0sojHu8c installed on Mon May 28 14:46:36 2012) # (Cron version V5.0 -- $Id: crontab.c,v 1.12 2004/01/23 18:56:42 vixie Exp $) PATH="$HOME/bin:/usr/local/sd/bin:/usr/local/bin:/usr/bin:/bin" TMP="/tmp" #------------------------------------------------------------------------------ #min hrs dom mon dow cj exe args #------------------------------------------------------------------------------ ##20 12 * * * cjx cj-my-backup ##29 12 * * * cjx cj-df ##30 12 * * * cjx cj-updatedb ##40 12 * * * cjx cj-defrag ##01 */4 * * * cjx chk-au #------------------------------------------------------------------------------ * * * * * /cygdrive/c/Program\ Files/Defraggler/df.exe E: /QD $ cd&& cat cron.log This file was written by the /usr/bin/cronlog script on 20120528_144702 From: root (Cron Daemon) To: zrgh1 Subject: Cron /cygdrive/c/Program\ Files/Defraggler/df.ex e E: /QD X-Cron-Env: X-Cron-Env: X-Cron-Env: X-Cron-Env: X-Cron-Env: X-Cron-Env: X-Cron-Env: X-Cron-Env: X-Cron-Env: X-Cron-Env: X-Cron-Env: X-Cron-Env: X-Cron-Env: X-Cron-Env: X-Cron-Env: X-Cron-Env: X-Cron-Env: X-Cron-Env: X-Cron-Env: X-Cron-Env: X-Cron-Env: X-Cron-Env: <**> Access Denied. Administrator permissions are needed to use the selected options. Use an administrator command prompt to complete these tasks. User "cyg_server" is a member of "Administrators" and UAC is disabled. I have checked the "Run this program as an administrator" option(*) on the shortcut (compatibility tab) to the desktop mintty terminal before running 'cron-config'. (*) Ditto for "setup.exe". Created a shortcut to that and always run as administrator. When I run.. "/cygdrive/c/Program\ Files/Defraggler/df.exe E: /QD" ..from the mintty command line all is well. It appears (**) the cron daemon is not getting privileges to run "df.exe" but I am stumped on how to proceed. TIA Guy -- 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