public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* access() function in 1.7
@ 2009-01-24  9:14 David Billinghurst
  2009-01-24 21:27 ` Corinna Vinschen
  0 siblings, 1 reply; 3+ messages in thread
From: David Billinghurst @ 2009-01-24  9:14 UTC (permalink / raw)
  To: cygwin

I am having a problem with the access() function in cygwin-1.7.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38956

$ touch foobar_file
$ chmod a-w foobar_file

$ cat test_access.c
#include <stdio.h>
#include <unistd.h>
int main (void) {
   char *file="foobar_file";
   int m = W_OK;
   printf("access = %d\n",access(file,m));
}

$ touch foobar_file
$ chmod a-w foobar_file

Under cygwin-1.5
$ ./test_access
access = -1

Under cygwin-1.7
$  ./test_access.exe
access = -1




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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: access() function in 1.7
  2009-01-24  9:14 access() function in 1.7 David Billinghurst
@ 2009-01-24 21:27 ` Corinna Vinschen
  2009-01-24 22:55   ` David Billinghurst
  0 siblings, 1 reply; 3+ messages in thread
From: Corinna Vinschen @ 2009-01-24 21:27 UTC (permalink / raw)
  To: cygwin

On Jan 24 18:40, David Billinghurst wrote:
> I am having a problem with the access() function in cygwin-1.7.
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38956
>[...]
> Under cygwin-1.5
> $ ./test_access
> access = -1
>
> Under cygwin-1.7
> $  ./test_access.exe
> access = -1

I assume you mean "access = 0" under 1.7.  If that's what you see, the
test probably works as designed.  You're running the test under an
administrative account.  Admin accounts have always the right to write,
same as under Linux.  


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: access() function in 1.7
  2009-01-24 21:27 ` Corinna Vinschen
@ 2009-01-24 22:55   ` David Billinghurst
  0 siblings, 0 replies; 3+ messages in thread
From: David Billinghurst @ 2009-01-24 22:55 UTC (permalink / raw)
  To: cygwin, cygwin

Corinna Vinschen wrote:
> On Jan 24 18:40, David Billinghurst wrote:
>> I am having a problem with the access() function in cygwin-1.7.
>> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38956
>> [...]
>> Under cygwin-1.5
>> $ ./test_access
>> access = -1
>>
>> Under cygwin-1.7
>> $  ./test_access.exe
>> access = -1
> 
> I assume you mean "access = 0" under 1.7.  If that's what you see, the
> test probably works as designed.  You're running the test under an
> administrative account.  Admin accounts have always the right to write,
> same as under Linux.  
> 
> 
> Corinna
> 

The account does have Local Administrator rights.  Thank you for the 
explanation.

	David

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-01-24 22:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-24  9:14 access() function in 1.7 David Billinghurst
2009-01-24 21:27 ` Corinna Vinschen
2009-01-24 22:55   ` David Billinghurst

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).