In what way is /cygdrive special WRT to permissions?

Jeremy Bopp jeremy@bopp.net
Wed Oct 6 22:11:00 GMT 2010


On 10/6/2010 4:38 PM, Andy Hall wrote:
> There is no doubt that this behavior changed from 1.5 to 1.7.  The instant I
> upgraded from 1.5 to 1.7.7,  build scripts that test for the abilty to write
> to the directories in F: instantly started reporting the directories were
> not writeable using test -w, yet you can still create and write files via
> Cygwin.  

<snip>

> The explict mounting of //vega/repository is the workaround I eventually
> settled on.

At the risk of taking this thread a little off topic, why do your build
scripts explicitly check for write access to these directories?  I agree
that it would be good to keep this working in order to maintain
compatibility with older Cygwin releases, but the build scripts we use
where I work don't bother to check for access to things before using
them.  They just assume that they have the necessary access and then
fail with an explicit error when those assumptions are faulty.

I also always considered the check before you use methodology to be a
bit risky to begin with.  The reason being that between the time you
check for access and the time you try to actually use that access
another process could remove the access or even the entire resource.  At
that point you fail as if you never bothered to check for access in the
first place, so your logic had better be able to deal with that somehow.
 If you're going to have logic to handle failed access attempts, you may
as well abandon the access checks. :-)

-Jeremy

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



More information about the Cygwin mailing list