delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/08/28/16:03:47

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
Message-ID: <43121988.A55F8EE8@dessent.net>
Date: Sun, 28 Aug 2005 13:07:36 -0700
From: Brian Dessent <brian AT dessent DOT net>
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: perlcc and permissions
References: <0B9EBBE7CA79D7118FD00002B3B2B9B910ECD62D AT nm75ex51 DOT das DOT honeywell DOT com>
X-IsSubscribed: yes
Reply-To: cygwin AT cygwin DOT com

"Baksik, Frederick (NM75)" wrote:

(Disclaimer - I'm no expert on this stuff)

> # owner: Administrators
> # group: Domain Users
> user::rw-
> group::---
> mask:rwx
> other:---
> 
> e728075 AT DAS-FBAKSIK ~
> $ perl -ne 'print "hi: ", $_' new.pl
> hi: print "hello world\n"

Is 'e728075' a member of the Administrators group?  If so then you are
the owner of the file and should have r/w permission.  However, your UID
does not equal the UID specified in the ACL of the file (Administrators,
544) and so any program that only knows about straight posix permissions
would not consider you the owner.  In posix world the owner is a single
user and can't be a group.

> $ ls -l new.pl
> -rw-------  1 sshd Domain Users 22 Aug 28 13:04 new.pl
> 
> e728075 AT DAS-FBAKSIK ~
> $ cat new.pl
> cat: new.pl: Permission denied

Here you are no longer the owner of the file and so you have no
permissions.

I think it's really just a demonstration of how the two different
permission systems don't always map onto each other exactly.  I think
this has come up before and someone even pointed out that there's a
variable you can set in Perl to tell it not to try to check posix
permissions but instead to just try accessing the file.  Or something
like that.  I don't remember the details.

Brian

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