X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:reply-to:message-id:to:subject :in-reply-to:references:mime-version:content-type :content-transfer-encoding; q=dns; s=default; b=QWGon/ChaOcsNeID OIApKmxzKQRosn3r7AdYHPb5WENd4O+gJPlLpsjEiBavv9uob8U2MsGdt8Z4suBk trUX//7imnPXfQ6PDbXmGHqDU12UOq1CORPvrDyrvS4BbGYQs8BtLdR028HiBc3j OdSJyGPIdM6YQ5lGYBPGgL2GSLI= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:reply-to:message-id:to:subject :in-reply-to:references:mime-version:content-type :content-transfer-encoding; s=default; bh=zEleVhGBpWRG6KFxYF0eo8 T8bwU=; b=YUK1lYKQYNwDWs5FPBFkkHzNKxgEfwJ0pO2c19PnwJe0uDs6rMAO6Y X1RwwF3fFzJoBX4n+PnpoDItI6SO3mZuYk8cpEYoVZzoQ6I++Hde/YjQl8AWrXwm 00zl88hOR3mrWJ1HKKCjEwW6CUrFiQjReNyClSAmir9q+QYjUEnTg= 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 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=3.5 required=5.0 tests=AWL,BAYES_60,BODY_8BITS,FREEMAIL_FROM,GARBLED_BODY,KAM_FROM_URIBL_PCCC,KAM_THEBAT,MIME_BASE64_BLANKS,NORMAL_HTTP_TO_IP,SPF_SOFTFAIL autolearn=no version=3.3.2 X-HELO: smtp.ht-systems.ru Date: Mon, 30 Mar 2015 17:23:45 +0300 From: Andrey Repin Reply-To: cygwin AT cygwin DOT com Message-ID: <131547857.20150330172345@yandex.ru> To: Phil Smith , cygwin AT cygwin DOT com Subject: Re: Possible chmod problem with a path In-Reply-To: <84BCCD71182F0046BCD2FB054FE52379197703FDDD@HQMAILSVR02.voltage.com> References: <84BCCD71182F0046BCD2FB054FE52379197703FDDD AT HQMAILSVR02 DOT voltage DOT com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 X-IsSubscribed: yes Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by delorie.com id t2UEZY8k004927 Greetings, Phil Smith! > The short description is that chmod *with a path* says it works, but > doesn't. If I cd to the directory and do it from there, it works. > This behavior *seems* to have started recently, after I installed gawk (and > in the process updated some other Cygwin bits). Our scaffolding for some > cross-platform builds uses Cygwin (and CMake), and I started having > permissions problems with the build artifacts on my machine. > I've tried with both forward and backslashes. In the examples below, the > path is longish, but I can reproduce it to C:\temp as well. A colleague with > an older Cygwin cannot reproduce it. Of course it's possible this is Windows > somehow having become confused, but it's hard to see how (but then, it's Windows...OK, I'm looping). > I've read the FAQ and searched the archives as best I can -- there are lots > of hits for "chmod" and "path", of course. > Any suggestions (besides "reformat and reinstall Windows") welcome. > Environment: > Windows 7 Professional, fully patched, 64-bit, Genuine Intel. > uname -r 1.7.35(0.287/5/3) > Asterisked lines are my comments: > * OK, I'm in C:\SVN\zFPE610: > C:\SVN\zFPE610>cat ZFP-BUILD-2015-03-27-001\Updated\VSHPCRT1 > cat: ZFP-BUILD-2015-03-27-001\Updated\VSHPCRT1: Permission denied > * Let's chmod: > C:\SVN\zFPE610>chmod -v 777 C:/SVN/zFPE610/ZFP-BUILD-2015-03-27-001/Updated/* > mode of 'C:/SVN/zFPE610/ZFP-BUILD-2015-03-27-001/Updated/VSHPCRT1' changed > from 0644 (rw-r--r--) to 0777 (rwxrwxrwx) Please use Cygwin paths with Cygwin tools. Windows paths are not guaranteed to work with every Cygwin tool. > * Nope: > C:\SVN\zFPE610>cat ZFP-BUILD-2015-03-27-001\Updated\VSHPCRT1 > cat: ZFP-BUILD-2015-03-27-001\Updated\VSHPCRT1: Permission denied > * Let's look: > C:\SVN\zFPE610>ls -l ZFP-BUILD-2015-03-27-001/Updated/* > ----rwx---+ 1 phsiii None 6800 Mar 27 15:24 > ZFP-BUILD-2015-03-27-001/Updated/VSHPCRT1 > * That sneaky chmod lied! > * Let's go to the directory: > C:\SVN\zFPE610>cd C:/SVN/zFPE610/ZFP-BUILD-2015-03-27-001/Updated/ > * Nope, as expected: > C:\SVN\zFPE610\ZFP-BUILD-2015-03-27-001\Updated>cat VSHPCRT1 > cat: VSHPCRT1: Permission denied > * Now let's chmod again from there: > C:\SVN\zFPE610\ZFP-BUILD-2015-03-27-001\Updated>chmod 777 * > * Hey, it works! > C:\SVN\zFPE610\ZFP-BUILD-2015-03-27-001\Updated>cat VSHPCRT1 > ¦Q¦@@X¦¦^G¦¦b¦¦¦¦¦¦¦¦¦¦a¦¦a¦¦¦¦K¦¦@@@Ö¦¦¦¦¦¦¦@¦¦¦¦`¦¦¦¦¦¦¦¦¦¦¦¦¦¦@@¦8@@¦8@@ What you are doing may or may not work, depends, if you are using Cygwin or native Subversion client. In either case, it isn't very bright idea to enforce POSIX access mask outside Cygwin tree, unless you know what you are doing and absolutely need it. From your description, you don't need it at all. -- With best regards, Andrey Repin Monday, March 30, 2015 17:16:28 Sorry for my terrible english...