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:message-id:date:from:reply-to:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=I/IROmuqR0tZ89a1 H/7dDzwE0Q4rT+C7UF/qSIFqxqy681tIjuQwtM/fh2Nc7Kss5cLkXm583FiHUj/C 47ou6FvvXidXkk/g3/xTP6MmEBQ7CUc5Uv2d8Z7t3MKJoiWYR9sAzzluiejtjCvm AG8TTrbB0YPxYzORFRbxI9f28I4= 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:message-id:date:from:reply-to:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; s=default; bh=+2hwxYFVfig7T5wVwLajpB qz9EM=; b=aUVRlhK5Pq4vMNcHUHa8vcgXVbTT62+ObYIz3Q+gdxpvRE4GChrXtT K76zm2ozPIJVAp5ABLLsUcASWEhhQQectmBMt1G4HqxB4YoU5sCkl30wQYaUR/iH Dqx7xaWfw8taA17C/AxWNOmlMZGX9vY/h582XWwR8yyHHaCw1dQrI= 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 X-Spam-SWARE-Status: No, score=1.3 required=5.0 tests=AWL,BAYES_50,KHOP_THREADED,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_NO,RCVD_IN_HOSTKARMA_YE,RDNS_NONE autolearn=no version=3.3.1 Message-id: <5202966E.4050508@cygwin.com> Date: Wed, 07 Aug 2013 14:48:14 -0400 From: "Larry Hall (Cygwin)" Reply-to: cygwin AT cygwin DOT com User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 MIME-version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: chmod questions References: <479059e9-1e1f-4289-9bfb-98dac1c1fafe AT default> In-reply-to: <479059e9-1e1f-4289-9bfb-98dac1c1fafe@default> Content-type: text/plain; charset=ISO-8859-1; format=flowed Content-transfer-encoding: 7bit On 8/7/2013 2:33 PM, Drew Adams wrote: > I have read various info regarding trying to make Cygwin's `chmod' > work as (I) expected, including the Cygwin FAQ and user guide. > I am using Windows 7 with an NTFS disk. My user and group are > defined as they should be AFAIK. > > Two questions in this regard: > > . is "chmod a-w" supposed to set the Windows Read-only attribute > on Windows 7? No. > . is "chmod a-w" supposed to cause "ls -l" to show -r-r-r on > Windows 7? Not exactly. More precisely, it will remove the write permissions for all. > When I do `chmod a-w' it does not seem to have any effect. The > target file is still writable. Can someone please tell me what > I'm missing? Thx. I'm assuming that you're not using the exact syntax that you have above. This works for me: $ ls -l total 23302 -rwxr-xr-x 1 lhall None 72393 Jun 17 12:46 a.exe* -rw-r--r-- 1 lhall None 84 Jun 17 12:45 helloworld.c -rw-r--r-- 1 lhall None 587 Jun 17 12:45 helloworld.o $ attrib A C:\tmp\junk\a.exe A C:\tmp\junk\helloworld.c A C:\tmp\junk\helloworld.o $ chmod -w * $ ls -l total 23302 -r-xr-xr-x 1 lhall None 72393 Jun 17 12:46 a.exe* -r--r--r-- 1 lhall None 84 Jun 17 12:45 helloworld.c -r--r--r-- 1 lhall None 587 Jun 17 12:45 helloworld.o $ attrib A C:\tmp\junk\a.exe A C:\tmp\junk\helloworld.c A C:\tmp\junk\helloworld.o Of course, whatever your umask setting is comes into play as well. -- Larry _____________________________________________________________________ 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