This is the mail archive of the cygwin 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: perlcc and permissions


"Baksik, Frederick (NM75)" wrote:

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

> # owner: Administrators
> # group: Domain Users
> user::rw-
> group::---
> mask:rwx
> other:---
> 
> e728075@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@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/


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