delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1999/03/08/08:44:44

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
Sender: cygwin-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com
Message-Id: <4.1.19990308114049.016bde90@mail.club-internet.fr>
Message-Id: <4.1.19990308114049.016bde90@mail.club-internet.fr>
X-Sender: sbarre AT mail DOT club-internet DOT fr
X-Mailer: QUALCOMM Windows Eudora Pro Version 4.1
Date: Mon, 08 Mar 1999 11:59:35 +0100
To: Charles Wilson <cwilson AT ee DOT gatech DOT edu>
From: Sebastien Barre <Sebastien DOT Barre AT utc DOT fr>
Subject: 'ntea' CHECK please (was Re: Compiling Perl)
Cc: cygwin AT sourceware DOT cygnus DOT com
In-Reply-To: <36E37A18.A15F8524@ece.gatech.edu>
References: <19990306184033 DOT 2269 DOT rocketmail AT send1e DOT yahoomail DOT com>
<4 DOT 1 DOT 19990307154058 DOT 016d0040 AT mail DOT club-internet DOT fr>
Mime-Version: 1.0

Charles Wilson and I are still fighting with Perl. Some of you pointed me
the fact that adding 'ntea' to CYGWIN could solve some file permissions
problems. True.

Here is a short test (ntea is set). I just want to be sure if these are
KNOWN bugs :


*) First, some stuff about groups and username (as it is might not be
obvious fro you with french names) :

administrateur [541] /tmp$ cat /etc/passwd
Administrateur::500:513:seb::/bin/sh
InvitÚ::501:513:::/bin/sh
Test::1000:513:Yoh::/bin/sh

administrateur [542] /tmp$ cat /etc/group
Aucun::513:
Everyone::0:

=> 'Aucun' means 'None', 'InvitÚ' is 'Guest', 'Administrateur' is... well
you guessed it.


*) Let's create a file

administrateur [544] /tmp$ touch foo
administrateur [545] /tmp$ ll foo
-rw-rw-rw-   1 544      Aucun           0 Mar  8 12:43 foo
administrateur [546] /tmp$ perl -e 'print "yes\n" if -w "foo";'
yes

=> all right, it's writable (perl will display 'yes' if the -w test
succeeds), this is working right because I'm using 'ntea'.
=> that file does NOT belong to me, due to the known NT'ism, it belongs to
the UID of the Administrator group (544).


*) Let's create a directory (which is a kind of file)

administrateur [547] /tmp$ mkdir bar
administrateur [549] /tmp$ ll
total 0
drwxr-xr-x   2 544      Aucun           0 Mar  8 12:44 bar/
-rw-rw-rw-   1 544      Aucun           0 Mar  8 12:43 foo
administrateur [550] /tmp$ perl -e 'print "yes\n" if -w "bar";'

=> *ugh*, 'bar' is NOT writable. Why ? I do not know. Here is a first
problem I'd like to clarify (is it a known bug)
=> that file does NOT belong to me (like foo), due to the known NT'ism, it
belongs to the UID of the Administrator group (544).


*) Let's try to chmod the directory :

administrateur [551] /tmp$ chmod a+w bar
administrateur [552] /tmp$ ll
total 0
drwxr-xr-x   2 544      Aucun           0 Mar  8 12:44 bar/
-rw-rw-rw-   1 544      Aucun           0 Mar  8 12:43 foo

=> No change.


*) Let's change the ownership to my ID (administrateur) :

administrateur [554] /tmp$ chown administrateur bar
administrateur [555] /tmp$ ll
total 0
drwxr-xr-x   2 administ Aucun           0 Mar  8 12:44 bar/
-rw-rw-rw-   1 544      Aucun           0 Mar  8 12:43 foo
administrateur [556] /tmp$ perl -e 'print "yes\n" if -w "bar";'
yes

=> Now it's writable...
=> Do I have to do this for every directory I'll have to create ?

Thanks


______________________________________________________________
Sebastien Barre                  http://www.hds.utc.fr/~barre/

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019