DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 4BTAd9wk1813933 Authentication-Results: delorie.com; dmarc=pass (p=none dis=none) header.from=cygwin.com Authentication-Results: delorie.com; spf=pass smtp.mailfrom=cygwin.com DKIM-Filter: OpenDKIM Filter v2.11.0 delorie.com 4BTAd9wk1813933 Authentication-Results: delorie.com; dkim=pass (1024-bit key, unprotected) header.d=cygwin.com header.i=@cygwin.com header.a=rsa-sha256 header.s=default header.b=NfeKKkHh X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 10D23385841C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1735468748; bh=X5S1w/GFA2WbICUMAUiM8Q1gsUk7UgLIr/1IMGqIeX8=; h=To:Subject:Date:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=NfeKKkHhveHTccEynsaMsKkBmUVWFqE9k0OYp8+LqVWyVwqKfo/NN8XltHB3t6MXP Dz7J6ZFdWk8AXJNMcDImYdpnXRtO020umQy4xzcRHSY9XZydJ9q8Ko1oNluFzcz+JH EzTLX7qCDCnFobJHnzRMOIAHjgcF0MolQoTcjSfM= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 67A6A3858D34 ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 67A6A3858D34 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1735468724; cv=none; b=dLlRaCQlrr7KlyIwX0ik8B1eSjKmBLTFScp/Z0jIrbFDQm8qj32D6qOcs8LKBsVvSvNDNPRRoNnWqAfmGhL9E3a+0nPefRwlGuOKB/Qerc9U8XTUyfDsrk2aP0SyhsHBx5HTSgJ9yfal+xZtI166ZPemZzEDgYDY15QCtQKdxuI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1735468724; c=relaxed/simple; bh=S3LfP4Wat+msKLIJTQ8oNZskvKdWCS6V+8s/5IIkNX8=; h=To:From:Subject:Date:Message-ID:Mime-Version; b=G5ZdAZjWuk3Xr0LArLhQsH3dPqqel/GudbMZqMzytzDvE7qEEVoenLUIqcXJIBw/8Pr9NwTVavGJ9advqN6Fw8NenOWrsbfJ5RF406L0R4ny5++m/9/HojZoWdTT0HZ3YI78G87bkkplyxo1Qg3lIGVYMa9QxRUSBVnts2QAYaU= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 67A6A3858D34 X-Injected-Via-Gmane: http://gmane.org/ To: cygwin AT cygwin DOT com Subject: Re: Anomaly in CRON execution of shell script Date: Sun, 29 Dec 2024 10:38:34 +0000 Message-ID: References: <20241229092042 DOT de90355881033baefebdedc9 AT nifty DOT ne DOT jp> Mime-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 Lightning/5.4 In-Reply-To: <20241229092042.de90355881033baefebdedc9@nifty.ne.jp> Content-Language: en-GB X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.30 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Chris Elvidge via Cygwin Reply-To: Chris Elvidge Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com Sender: "Cygwin" On 29/12/2024 at 00:20, Takashi Yano via Cygwin wrote: > On Sat, 28 Dec 2024 17:07:10 +0000 > Chris Elvidge wrote: >> I have a directory of files that I need the contained executables run >> from CRON. (Like run-parts.) >> >> I have found that since 25/12/2024, when run from CRON, it doesn't >> differentiate between executable and non-executable files. I.e. tries to >> run the non-executables. It ran correctly on 24/12/2024, i.e apache2 and >> updatedb ran, rest skipped. >> >> Check file (simplified bit of original): >> $ cat bin/check-execute-bit >> #!/bin/sh >> cd $HOME/daily >> for S in *; do >> [ -x "$S" ] && echo "$S : executable" || echo "$S : not executable" >> done >> >> Directory contents: >> $ ls -l $HOME/daily >> total 48K >> -rwxr-xr-x 1 celvi celvi 625 Apr 24 2024 apache2 >> -rw-r--r-- 1 celvi celvi 15K Apr 24 2024 apt >> -rw-r--r-- 1 celvi celvi 355 Apr 24 2024 bsdmainutils >> -rw-r--r-- 1 celvi celvi 1.6K Apr 24 2024 dpkg >> -rw-r--r-- 1 celvi celvi 2.2K Apr 24 2024 locate >> -rw-r--r-- 1 celvi celvi 1.3K Apr 24 2024 man-db >> -rw-r--r-- 1 celvi celvi 1.1K Apr 24 2024 ntp >> -rw-r--r-- 1 celvi celvi 257 Apr 26 2024 passwd >> -rwxr-xr-x 1 celvi celvi 932 Apr 24 2024 updatedb >> >> Run from command line: >> $ check-execute-bit >> apache2 : executable >> apt : not executable >> bsdmainutils : not executable >> dpkg : not executable >> locate : not executable >> man-db : not executable >> ntp : not executable >> passwd : not executable >> updatedb : executable >> >> Output from CRON running check-execute-bit: >> apache2 executable >> apt executable >> bsdmainutils executable >> dpkg executable >> locate executable >> man-db executable >> ntp executable >> passwd executable >> updatedb executable >> >> >> Anyone any ideas where I can look next for what is going wrong? > > If you are running cron as privileged account (like SYSTEM), > perhaps, this is due to: > https://cygwin.com/pipermail/cygwin/2024-December/256972.html > > This problem will be fixed by: > https://cygwin.com/pipermail/cygwin-patches/2024q4/013146.html > OK. Thanks. I'll work around it for the time being. -- Chris Elvidge England -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple