Re: fork error in Windows 2003 running as normal user

2005-03-24 Thread Corinna Vinschen
On Mar 24 00:32, Kris Thielemans wrote:
 Hi Igor
 
 Thanks for your help.

Does setting CYGWIN to notraverse help?

Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader  mailto:cygwin@cygwin.com
Red Hat, Inc.

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



Re: fork error in Windows 2003 running as normal user

2005-03-24 Thread Igor Pechtchanski
On Thu, 24 Mar 2005, Corinna Vinschen wrote:

 On Mar 24 00:32, Kris Thielemans wrote:
  Hi Igor
 
  Thanks for your help.

 Does setting CYGWIN to notraverse help?

Ah, I didn't think of that.

What's strange, though, is that when he ssh's in, things work.  AFAICS,
ssh-host-config doesn't add notraverse to $CYGWIN...
Igor
-- 
http://cs.nyu.edu/~pechtcha/
  |\  _,,,---,,_[EMAIL PROTECTED]
ZZZzz /,`.-'`'-.  ;-;;,_[EMAIL PROTECTED]
 |,4-  ) )-,_. ,\ (  `'-'   Igor Pechtchanski, Ph.D.
'---''(_/--'  `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

The Sun will pass between the Earth and the Moon tonight for a total
Lunar eclipse... -- WCBS Radio Newsbrief, Oct 27 2004, 12:01 pm EDT

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



RE: fork error in Windows 2003 running as normal user

2005-03-24 Thread Kris Thielemans
Hi Corinna and Igor

 Does setting CYGWIN to notraverse help?

Hum. I'll have to confess now. Today it works (i.e. even without
notraverse)... I guess a reboot was necessary after changing the permissions
(don't understand why). So I guess (but am not sure) Igor's suggestion was
the right one after all.

So, thanks a million. I'm happy now!

Kris


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



Re: fork error in Windows 2003 running as normal user

2005-03-23 Thread Kris Thielemans
Corrado Labinaz corradolab at virgilio.it writes:

 I've installed latest (1.5.13) cygwin on Windows Server 2003.
 It works fine while logged on as Administrator.
 Launching Bash as a normal User give the following error:
 
   3 [main] bash 3252 fork_parent: child 3260 died waiting for longjmp
 before
  initialization
 bash: fork: Bad file descriptor
 


Hi

I have exactly the same under Windows XP Home sp2.

In fact, I had a lot of trouble to get cygwin to work earlier for non-admin
users on this machine. The permissions were always wrong (e.g. files in /bin
were only executable for administrators, files in Documents and Settings
were all owned by the administrator etc). I fixed all (?) that by using
chmod and chown and got it to work. Then I updated to the latest cygwin and
am stuck again. I still strongly suspect a permission problem, but cannot
find which one.


Some more info:

- going to a windows cmd prompt, cd \cygwin\bin, executing just bash, does
not give this error, but I'm still stuck with that error message when
running any executable e.g. ls

- from a windows cmd prompt, executing some other cygwin utilities gives the
following:
C:\cygwin\bin\id.exe (3876): *** could not load user32, Win32 error 1114

Win32 error 1114 is apparently
A dynamic link library (DLL) initialization routine failed.

So, I checked permissions of user32.dll in c:\windows\system32. Weirdly
enough, all dll and exe there are listed as owned by adminstrators, and
rwxrwx---. That does not make any sense to me. Anyway, I tried then to chmod
+rx user32.dll (and some other dlls) but that didn't change the above error,
nor solve the problem.


- ssh [EMAIL PROTECTED] (e.g. when logged in as admin on machine) works
fine. I can then do ls etc without problems. (isn't that weird?)

- cygcheck -s as non-admin user says there are 2 cygwin1.dll in the path
(but both listed as .\cygwin1.dll). cygcheck -s as admin users does not
complain at all. and of course, I can find only 1 in c:\cygwin\bin anyway.
(Maybe this is because cygcheck has some problems? It obviously complains
about running id.exe for instance).


I've attached both cygchecks.
Any help will be greatly appreciated.

Kris Thielemans

Cygwin Configuration Diagnostics
Current System Time: Wed Mar 23 22:37:43 2005

Windows XP Home Edition Ver 5.1 Build 2600 Service Pack 2

Path:   C:\cygwin\usr\X11R6\bin
C:\cygwin\usr\local\bin
C:\cygwin\bin
C:\cygwin\bin
c:\WINDOWS\system32
c:\WINDOWS
c:\WINDOWS\System32\Wbem
c:\Python22
c:\Program Files\PC-Doctor for Windows\services
.
c:\viavoice\Bin

Output from C:\cygwin\bin\id.exe (nontsec)
UID: 1007(Compaq_Owner) GID: 513(None)
513(None)

Output from C:\cygwin\bin\id.exe (ntsec)
UID: 1007(Compaq_Owner) GID: 513(None)
0(root) 513(None)   544(Administrators)
545(Users)

SysDir: C:\WINDOWS\system32
WinDir: C:\WINDOWS

HOME = `c:\Documents and Settings\Compaq_Owner'
MAKE_MODE = `unix'
PWD = `/'
USER = `Compaq_Owner'

Use `-r' to scan registry

c:  hd  NTFS151967Mb  12% CP CS UN PA FC PRESARIO
d:  hd  FAT32 4347Mb  75% CPUN   PRESARIO_RP
e:  cd N/AN/A
f:  fd N/AN/A
g:  fd N/AN/A
h:  fd N/AN/A
i:  fd N/AN/A

C:\cygwin   /   system  binmode
c:\Documents and Settings   /home   system  binmode
c:\Documents and Settings\kris.THIEFOB  /home/kris  system  binmode
C:\cygwin/bin   /usr/binsystem  binmode
C:\cygwin/lib   /usr/libsystem  binmode
.   /cygdrive   system  binmode,cygdrive

Found: C:\cygwin\bin\awk.exe
Found: C:\cygwin\bin\bash.exe
Found: C:\cygwin\bin\cat.exe
Found: C:\cygwin\bin\cp.exe
Found: C:\cygwin\bin\cpp.exe
Found: C:\cygwin\bin\find.exe
Found: C:\cygwin\bin\gcc.exe
Found: C:\cygwin\bin\gdb.exe
Found: C:\cygwin\bin\grep.exe
Found: C:\cygwin\bin\ld.exe
Found: C:\cygwin\bin\ls.exe
Found: C:\cygwin\bin\make.exe
Found: C:\cygwin\bin\mv.exe
Found: C:\cygwin\bin\rm.exe
Found: C:\cygwin\bin\sed.exe
Found: C:\cygwin\bin\sh.exe
Found: C:\cygwin\bin\tar.exe

  243k 2005/02/23 C:\cygwin\usr\X11R6\bin\cygdps-1.dll
   26k 2005/02/23 C:\cygwin\usr\X11R6\bin\cygdpstk-1.dll
   28k 2004/03/31 C:\cygwin\usr\X11R6\bin\cygDtPrint-1.dll
   21k 2005/02/23 C:\cygwin\usr\X11R6\bin\cygfontenc-1.dll
   36k 2005/02/23 C:\cygwin\usr\X11R6\bin\cygFS-6.dll
  358k 2005/02/23 C:\cygwin\usr\X11R6\bin\cygGL-1.dll
  438k 2005/02/23 C:\cygwin\usr\X11R6\bin\cygGLU-1.dll
   75k 2005/02/23 C:\cygwin\usr\X11R6\bin\cygICE-6.dll
   77k 2004/03/31 C:\cygwin\usr\X11R6\bin\cygMrm-2.dll
9k 2005/02/23 C:\cygwin\usr\X11R6\bin\cygoldX-6.dll
 1413k 2005/02/23 C:\cygwin\usr\X11R6\bin\cygOSMesa-4.dll
   20k 2005/02/23 

Re: fork error in Windows 2003 running as normal user

2005-03-23 Thread Igor Pechtchanski
On Wed, 23 Mar 2005, Kris Thielemans wrote:

 Corrado Labinaz corradolab at virgilio.it writes:

  I've installed latest (1.5.13) cygwin on Windows Server 2003.
  It works fine while logged on as Administrator.
  Launching Bash as a normal User give the following error:
 
3 [main] bash 3252 fork_parent: child 3260 died waiting for longjmp
  before
   initialization
  bash: fork: Bad file descriptor

 Hi

 I have exactly the same under Windows XP Home sp2.

Not the same problem at all.

 In fact, I had a lot of trouble to get cygwin to work earlier for non-admin
 users on this machine. The permissions were always wrong (e.g. files in /bin
 were only executable for administrators, files in Documents and Settings
 were all owned by the administrator etc). I fixed all (?) that by using
 chmod and chown and got it to work. Then I updated to the latest cygwin and
 am stuck again. I still strongly suspect a permission problem, but cannot
 find which one.

What does getfacl /bin report?  I'd bet there isn't an inheritable
execute permission for everyone.  If this is the case, all the DLLs will
not be executable for other, which is consistent with your symptoms
below.

 Some more info:

 - going to a windows cmd prompt, cd \cygwin\bin, executing just bash, does
 not give this error, but I'm still stuck with that error message when
 running any executable e.g. ls

 - from a windows cmd prompt, executing some other cygwin utilities gives the
 following:
 C:\cygwin\bin\id.exe (3876): *** could not load user32, Win32 error 1114

 Win32 error 1114 is apparently
 A dynamic link library (DLL) initialization routine failed.

It's probably not user32 (as bash also uses it).  Try cygintl-3.dll or
cygiconv-2.dll.

 So, I checked permissions of user32.dll in c:\windows\system32. Weirdly
 enough, all dll and exe there are listed as owned by adminstrators, and
 rwxrwx---. That does not make any sense to me. Anyway, I tried then to chmod
 +rx user32.dll (and some other dlls) but that didn't change the above error,
 nor solve the problem.

 - ssh [EMAIL PROTECTED] (e.g. when logged in as admin on machine) works
 fine. I can then do ls etc without problems. (isn't that weird?)

It is.  Probably because some of SYSTEM's credentials leak through to the
underlying shell...

 - cygcheck -s as non-admin user says there are 2 cygwin1.dll in the path
 (but both listed as .\cygwin1.dll). cygcheck -s as admin users does not
 complain at all. and of course, I can find only 1 in c:\cygwin\bin anyway.
 (Maybe this is because cygcheck has some problems? It obviously complains
 about running id.exe for instance).

This is a superfluous message in this case.  It appears whenever cygcheck
is run from /bin, since cygcheck always checks the current directory
independently of the PATH.  Arguably, it's a cygcheck bug.

Either you ran admin's cygcheck from a different directory, or .
is not in the PATH for admin...  According to your cygcheck output, it's
the former.

FYI, it's better to run cygcheck -svr instead of just cygcheck -s, as
you seem to have done.

 I've attached both cygchecks.
 Any help will be greatly appreciated.

Try chmod a+x /bin/*.dll and see if that solves your problem.  If yes,
then setfacl -m d:m:rwx,d:g:rwx,d:o:r-x /bin should help for future
updates...
HTH,
Igor
-- 
http://cs.nyu.edu/~pechtcha/
  |\  _,,,---,,_[EMAIL PROTECTED]
ZZZzz /,`.-'`'-.  ;-;;,_[EMAIL PROTECTED]
 |,4-  ) )-,_. ,\ (  `'-'   Igor Pechtchanski, Ph.D.
'---''(_/--'  `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

The Sun will pass between the Earth and the Moon tonight for a total
Lunar eclipse... -- WCBS Radio Newsbrief, Oct 27 2004, 12:01 pm EDT

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



Re: fork error in Windows 2003 running as normal user

2005-03-23 Thread Igor Pechtchanski
On Wed, 23 Mar 2005, Igor Pechtchanski wrote:

 On Wed, 23 Mar 2005, Kris Thielemans wrote:

  Corrado Labinaz corradolab at virgilio.it writes:
 
   I've installed latest (1.5.13) cygwin on Windows Server 2003.
   It works fine while logged on as Administrator.
   Launching Bash as a normal User give the following error:
  
 3 [main] bash 3252 fork_parent: child 3260 died waiting for longjmp
   before
initialization
   bash: fork: Bad file descriptor
 
  Hi
 
  I have exactly the same under Windows XP Home sp2.

 Not the same problem at all.

  In fact, I had a lot of trouble to get cygwin to work earlier for non-admin
  users on this machine. The permissions were always wrong (e.g. files in /bin
  were only executable for administrators, files in Documents and Settings
  were all owned by the administrator etc). I fixed all (?) that by using
  chmod and chown and got it to work. Then I updated to the latest cygwin and
  am stuck again. I still strongly suspect a permission problem, but cannot
  find which one.

 What does getfacl /bin report?  I'd bet there isn't an inheritable
 execute permission for everyone.  If this is the case, all the DLLs will
 not be executable for other, which is consistent with your symptoms
 below.

  Some more info:
 
  - going to a windows cmd prompt, cd \cygwin\bin, executing just bash, does
  not give this error, but I'm still stuck with that error message when
  running any executable e.g. ls
 
  - from a windows cmd prompt, executing some other cygwin utilities gives the
  following:
  C:\cygwin\bin\id.exe (3876): *** could not load user32, Win32 error 1114
 
  Win32 error 1114 is apparently
  A dynamic link library (DLL) initialization routine failed.

 It's probably not user32 (as bash also uses it).  Try cygintl-3.dll or
 cygiconv-2.dll.

  So, I checked permissions of user32.dll in c:\windows\system32. Weirdly
  enough, all dll and exe there are listed as owned by adminstrators, and
  rwxrwx---. That does not make any sense to me. Anyway, I tried then to chmod
  +rx user32.dll (and some other dlls) but that didn't change the above error,
  nor solve the problem.
 
  - ssh [EMAIL PROTECTED] (e.g. when logged in as admin on machine) works
  fine. I can then do ls etc without problems. (isn't that weird?)

 It is.  Probably because some of SYSTEM's credentials leak through to the
 underlying shell...

  - cygcheck -s as non-admin user says there are 2 cygwin1.dll in the path
  (but both listed as .\cygwin1.dll). cygcheck -s as admin users does not
  complain at all. and of course, I can find only 1 in c:\cygwin\bin anyway.
  (Maybe this is because cygcheck has some problems? It obviously complains
  about running id.exe for instance).

 This is a superfluous message in this case.  It appears whenever cygcheck
 is run from /bin, since cygcheck always checks the current directory
 independently of the PATH.  Arguably, it's a cygcheck bug.

 Either you ran admin's cygcheck from a different directory, or .
 is not in the PATH for admin...  According to your cygcheck output, it's
 the former.

 FYI, it's better to run cygcheck -svr instead of just cygcheck -s, as
 you seem to have done.

  I've attached both cygchecks.
  Any help will be greatly appreciated.

 Try chmod a+x /bin/*.dll and see if that solves your problem.  If yes,
 then setfacl -m d:m:rwx,d:g:rwx,d:o:r-x /bin should help for future

Make that setfacl -m d:m:rwx,d:g::rwx,d:o:r-x /bin.  Sigh.

 updates...
 HTH,
   Igor

-- 
http://cs.nyu.edu/~pechtcha/
  |\  _,,,---,,_[EMAIL PROTECTED]
ZZZzz /,`.-'`'-.  ;-;;,_[EMAIL PROTECTED]
 |,4-  ) )-,_. ,\ (  `'-'   Igor Pechtchanski, Ph.D.
'---''(_/--'  `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

The Sun will pass between the Earth and the Moon tonight for a total
Lunar eclipse... -- WCBS Radio Newsbrief, Oct 27 2004, 12:01 pm EDT

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



RE: fork error in Windows 2003 running as normal user

2005-03-23 Thread Kris Thielemans
 
Hi Igor

Thanks for your help.

 
 What does getfacl /bin report?  I'd bet there isn't an 
 inheritable execute permission for everyone.  If this is the 
 case, all the DLLs will not be executable for other, which 
 is consistent with your symptoms below.
 

$ getfacl /bin
# file: /bin
# owner: Compaq_Owner
# group: None
user::rwx
group::r-x
group:root:rwx
group:SYSTEM:rwx
group:Users:rwx
mask:rwx
other:r-x
default:user::rwx
default:group:root:rwx
default:group:SYSTEM:rwx
default:group:Users:rwx
default:mask:rwx

Before I've posted this, I've done things like
chmod -R go+rx bin lib


  C:\cygwin\bin\id.exe (3876): *** could not load user32, Win32 error 
  1114
 
  Win32 error 1114 is apparently
  A dynamic link library (DLL) initialization routine failed.
 
 It's probably not user32 (as bash also uses it).  Try 
 cygintl-3.dll or cygiconv-2.dll.
 

I don't think this is it:

$ getfacl cygiconv-2.dll
# file: cygiconv-2.dll
# owner: Compaq_Owner
# group: None
user::rwx
group::r-x
group:root:rwx
group:SYSTEM:rwx
group:Users:r-x
mask:rwx
other:r-x
$ getfacl cygintl-3.dll
# file: cygintl-3.dll
# owner: Compaq_Owner
# group: None
user::rwx
group::r-x
group:root:rwx
group:SYSTEM:rwx
group:Users:r-x
mask:rwx
other:r-x


 FYI, it's better to run cygcheck -svr instead of just 
 cygcheck -s, as you seem to have done.
 

Ok. Attached, in case it helps.
 
 Try chmod a+x /bin/*.dll and see if that solves your 

I guess you mean chmod o+x...

 problem.  If yes, then setfacl -m d:m:rwx,d:g:rwx,d:o:r-x 
 /bin should help for future updates...

As I mentioned above, the chmod didn't help. Now I also tried

setfacl -m d:m:rwx,d:g::rwx,d:o:r-x /bin

And no, that doesn't work either.


Some more info on permissions, also to clear up some confusion I might have
generated in my previous email.

Seems that I was caught by the difference between POSIX and NT ACLs (nicely
described in Corinna's text on ntsec in the cygwin documentation).

The dlls in c:\windows\system32 were all readable/executable by members of
the Users group, which presumably is why all windows programs did work :-).
I checked this with getfacl, but also by rebooting XP Home in Safe mode
(where you finally have the security tab in the file properties back). So,
there really was no need for me to change those permissions I guess.
(Corinna's document doesn't really specify who is in Users. I guess this is
because in NT and e.g. XP Pro you can set this in the user administration.
However, on XP Home, you cannot. I'm only hoping that every account is in
Users).

That brought me then to /etc/passwd. Indeed, my non-admin user had a group
ID as None. I changed that to Users. I also chown his files to kris.Users. 

Still exactly the same problems though.

Kris

Cygwin Configuration Diagnostics
Current System Time: Thu Mar 24 00:23:11 2005

Windows XP Home Edition Ver 5.1 Build 2600 Service Pack 2

Path:   C:\WINDOWS\system32
C:\WINDOWS
C:\WINDOWS\System32\Wbem
c:\Python22
C:\Program Files\PC-Doctor for Windows\services
.
C:\viavoice\Bin
c:\cygwin\bin

SysDir: C:\WINDOWS\system32
WinDir: C:\WINDOWS

Path = 
`C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;c:\Python22;C:\Program 
Files\PC-Doctor for Windows\services;;C:\viavoice\Bin;c:\cygwin\bin'

ALLUSERSPROFILE = `C:\Documents and Settings\All Users'
APPDATA = `C:\Documents and Settings\kris.THIEFOB\Application Data'
CommonProgramFiles = `C:\Program Files\Common Files'
COMPUTERNAME = `THIEFOB'
ComSpec = `C:\WINDOWS\system32\cmd.exe'
FP_NO_HOST_CHECK = `NO'
HOMEDRIVE = `C:'
LOGONSERVER = `\\THIEFOB'
NUMBER_OF_PROCESSORS = `1'
OS = `Windows_NT'
PATHEXT = `.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH'
PROCESSOR_ARCHITECTURE = `x86'
PROCESSOR_IDENTIFIER = `x86 Family 15 Model 3 Stepping 4, GenuineIntel'
PROCESSOR_LEVEL = `15'
PROCESSOR_REVISION = `0304'
ProgramFiles = `C:\Program Files'
PROMPT = `$P$G'
SESSIONNAME = `Console'
SystemDrive = `C:'
SystemRoot = `C:\WINDOWS'
TEMP = `C:\DOCUME~1\KRIS~1.THI\LOCALS~1\Temp'
TMP = `C:\DOCUME~1\KRIS~1.THI\LOCALS~1\Temp'
USERDOMAIN = `THIEFOB'
USERNAME = `kris'
USERPROFILE = `C:\Documents and Settings\kris.THIEFOB'
windir = `C:\WINDOWS'
POSIXLY_CORRECT = `1'

HKEY_CURRENT_USER\Software\Cygnus Solutions
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\Program Options
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2
  (default) = `/cygdrive'
  cygdrive flags = 0x0022
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/
  (default) = `C:\cygwin'
  flags = 0x000a
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/home
  (default) = `c:\Documents and Settings'
  flags = 0x000a
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/home/kris
  (default) =