www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/08/18/19:27:35

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
X-AuthUser: gerrit:koeln.convey.de
Date: Tue, 19 Aug 2003 01:32:52 +0200
From: "Gerrit P. Haase" <gp AT familiehaase DOT de>
Organization: Esse keine toten Tiere
X-Priority: 3 (Normal)
Message-ID: <35-1570999528.20030819013252@familiehaase.de>
To: Benoit Rochefort <Benoit DOT Rochefort AT gerad DOT ca>
CC: "Gerrit @ cygwin" <cygwin AT cygwin DOT com>
Subject: Re: -x weirdness
In-Reply-To: <16193.19010.57678.857942@scicily.montreal.ad-opt.com>
References: <16193 DOT 14627 DOT 802702 DOT 855384 AT scicily DOT montreal DOT ad-opt DOT com>
<197-1578450001 DOT 20030818232842 AT familiehaase DOT de>
<16193 DOT 19010 DOT 57678 DOT 857942 AT scicily DOT montreal DOT ad-opt DOT com>
MIME-Version: 1.0

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 AT 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 $?
0

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

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

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

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

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 AT 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 $?
1

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

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

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
user::rwx
group::---
mask:rwx
other:---

Gerrit
-- 
=^..^=


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