delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/05/09/18:08:39

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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
Date: Fri, 9 May 2003 18:08:30 -0400 (EDT)
From: lists AT m8y DOT org
X-X-Sender: nemo AT nautilus DOT m8y DOT org
To: cygwin AT cygwin DOT com
Subject: RE: How to "find" all writable files in a directory tree?
In-Reply-To: <5.2.1.1.2.20030509150109.0658b200@pop.sonic.net>
Message-ID: <Pine.LNX.4.53.0305091806190.21240@nautilus.m8y.org>
References: <EBEMJMPFEOOPGHBJFKGPKEAPFBAA DOT winston DOT gutkowski AT eztext DOT com>
<EBEMJMPFEOOPGHBJFKGPKEAPFBAA DOT winston DOT gutkowski AT eztext DOT com>
<5 DOT 2 DOT 1 DOT 1 DOT 2 DOT 20030509150109 DOT 0658b200 AT pop DOT sonic DOT net>
MIME-Version: 1.0

On Fri, 9 May 2003, Randall R Schulz wrote:

> 
> At 14:44 2003-05-09, lists AT m8y DOT org wrote:
> >-perm +222 is redundant
> 
> How do you figure? There are 8 combinations of write enable bits that 
> this permission specification matches. For "-perm +2" only one bit is 
> examined and there's only one way for it to succeed.

My reading of the manual is that:
-222 examines bit 2 being on in all of the 3 areas
+2 examines bit 2 being on in all of the 3 areas
222 checks exact permissions 222

> >-perm +mode
> >     Any of the permission bits mode are set for the file.
> >
> >-perm -222 is equivalent to -perm +2
> 
> Either I'm dense or you're mistaken.

I could be mistaken, but -perm +2  has always worked for me.  I'll test it later.


> Are you assuming a FAT file system? Cygwin takes advantage of NTFS 
> permissions when possible (and when the now-default ntsec option of the 
> CYGWIN environment variable is enabled).

Nope, and yes, am aware :)

> Randall Schulz
> 
> 
> 
> 
> --
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
> Problem reports:       http://cygwin.com/problems.html
> Documentation:         http://cygwin.com/docs.html
> FAQ:                   http://cygwin.com/faq/
> 
> 

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019