delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/09/08/21:02:41

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/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
From: ericblake AT comcast DOT net (Eric Blake)
To: Matthew Movafaghi <mattmova AT hotmail DOT com>, cygwin AT cygwin DOT com
Subject: Re: Simple find command does not work for * .html
Date: Fri, 09 Sep 2005 01:01:15 +0000
Message-Id: <090920050101.4909.4320DEDB0006BBE90000132D22007507840A050E040D0C079D0A@comcast.net>
X-Authenticated-Sender: ZXJpY2JsYWtlQGNvbWNhc3QubmV0

http://cygwin.com/acronyms/#TOFU - reformatted

> >From: ericblake AT comcast.net (Eric Blake)
> >To: Matthew Movafaghi <mattmova AT hotmail.com>, cygwin AT cygwin.com

http://cygwin.com/acronyms/#PCYMTNQREAIYR

> > > `find d:\ -type f -perm -u+w -name *.properties`
> It was user error... of course.  Thanks for the fix.
> 
> I was just trying to find all writiable files of certain types.
> 
> 
> However, the command
> 'find /cygdrive/d -type f -perm -u+w -name \*.html' will sometimes not find 
> a writable file when windows thinks that it is.  When viewed with ls -l, the 
> file doe not look writable, but when viewed with dir *.html /A-r /S from a 
> cmd prompt the file shows up.
> 
> Any thoughts?

Windows permissions and POSIX permissions don't always match.
POSIX permissions map the 9 POSIX bits with ACLs onto windows
access rights, not the more archaic read-only attribute, whereas the
/A switch to DOS's dir looks at the read-only attribute (be aware that
there is also a cygwin dir, which is a thin wrapper around ls, and which
doesn't like DOS syntax - be careful what you are using).  And there
is also the question of whether the ACLs give different permissions to
multiple owners or groups, something that basic POSIX permissions do
not handle very well, but which getfacl does do.  Read up on
http://cygwin.com/cygwin-ug-net/highlights.html#ov-hi-perm and
http://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-common.  If ls -l
does not show a file as writeable, then find -perm u+w will not either.

--
Eric Blake



--
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