This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project. See the Cygwin home page for more information.
[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index] [Subject Index] [Author Index] [Thread Index]

'ntea' CHECK please (was Re: Compiling Perl)



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@sourceware.cygnus.com