This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: -x weirdness

Hallo Benoit,

Am Montag, 18. August 2003 um 23:50 schriebst du:

> But you tested on *YOUR* /usr/bin/bash, what is your id and
> the permissions setted on your /usr/bin/bash program? Read
> carefully the output I sent (especially file
> mode/owner/group). May be you can make a similar test on
> another program that you set the permissions/owner/group as
> I have?

I see, sorry.

> As pointed out, that doesn't explain the matter with
> /usr/bin/test which is also reporting /usr/bin/bash as
> beeing non-executable.

>>> $ ls -al /usr/bin/bash
>>> -rwx------+   1 Administ Domain U   531968 Mar 13 04:29 /usr/bin/bash*

>>> As you can see, even if I am:
>>> $ id
>>> uid=17199(benoitr) gid=10513(Domain Users) groups=10513(Domain Users),11121(Exceed Users)

#gerrit@loreley /tmp/perl/perl-5.8.1
$ ls -al .patch
-rwx------    1 #gerrit  Domänen-Admins        6 Aug 15 18:51 .patch*

$ [ -x .patch ]; echo $?

$ /usr/bin/test -x .patch; echo $?

$ perl -e 'print -x ".patch" ? 0 : 1 , "\n"'

Hmm, the file is mine, I'm the domain-admin, I get '0', your file is
owned by Administrastor and domain user is the group, you're not
Administrator so you get 1 from this perl snippet, what is wrong about

Well, you said you still can execute bash.exe, test reports it as
executable.  Since Windows ACLs are very fine grained you may have the
permission to execute it, regardless what Cygwin ls displays , there
is just a subset of the windows ACLs displayed, e.g. a file may be
accessed by several groups and you may set the ACL different for each

What are the bash.exe permissions beyond what ls is displaying?  Which
Windows version do you use?  What says getfacl about your bash.exe?

If I login as another user I get '1' and it is consistently:

ismene2@loreley /tmp/perl/perl-5.8.1
$ id
uid=1008(ismene2) gid=513(Domänen-Benutzer) groups=513(Domänen-Benutzer),545(Benutzer),10513(Domänen-Benutzer)

$ ls -al .patch
-rwx------    1 #gerrit  Domänen-Admins        6 Aug 15 18:51 .patch

$ [ -x .patch ]; echo $?

$ /usr/bin/test -x .patch; echo $?

$ perl -e 'print -x ".patch" ? 0 : 1 , "\n"'

If I try to execute as the other user I get:
$ ./.patch
-bash: ./.patch: Permission denied

$ getfacl .patch
# file: .patch
# owner: #gerrit
# group: Domänen-Admins


Unsubscribe info:
Problem reports:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]