Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com X-Authentication-Warning: olympic.seas.upenn.edu: httpd set sender to voigt AT seas DOT upenn DOT edu using -f Message-ID: <1110929913.423771f99dea4@webmail.seas.upenn.edu> Date: Tue, 15 Mar 2005 18:38:33 -0500 From: voigt AT seas DOT upenn DOT edu To: cygwin AT cygwin DOT com Subject: permission failures as ssh user -- only experienced by cygwin programs MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit User-Agent: Internet Messaging Program (IMP) 3.1 Hello all, I'm been experiencing a failure of non-Administrator ssh accounts recently. First, I thought they were caused by 3PP nxclient changing the /tmp mount point, but I got that changed back and rebooted and now /tmp is mounted normally again. It seems that cygwin is somehow causing GetFileInformation to fail. The id command and all file access fails as a result. An administrator account connected via ssh works fine, id produces good output. The user for ssh has a publickey, another with a password, and they both experience the same symptoms. I even compiled the cygwin source package, but the source code isn't providing much help. Before I replaced cygwin1.dll with the latest snapshot, cygpath -w /tmp was also failing. Here is what happens (I've set my shell to cmd.exe temporarily because bash and tcsh are totally useless, bash says fork failure and tcsh says no more processes): [Ben AT rbv4531 ~]$ ssh svn Last login: Tue Mar 15 18:19:17 2005 from 127.0.0.1 Fanfare!!! You are successfully logged in to this server!!! Microsoft Windows 2000 [Version 5.00.2195] (C) Copyright 1985-2000 Microsoft Corp. [rbv4531] f:\Programming\svnrepos>dir c:\cygwin dir c:\cygwin Volume in drive C is System Volume Serial Number is 58E5-4EED Directory of c:\cygwin 22-01-2005 22:57 . 22-01-2005 22:57 .. 14-02-2003 22:56 .ssh 15-03-2005 18:07 bin 22-01-2005 22:57 cygdrive 24-09-2002 12:43 57 cygwin.bat 15-03-2005 15:43 7,022 cygwin.ico 10-03-2003 19:21 52,352 debugs.lib 15-03-2005 18:19 etc 30-01-2005 03:17 home 15-03-2005 14:31 lib 14-02-2003 22:57 octave-forge-2002.05.09 23-01-2005 13:46 opt 15-03-2005 17:16 tmp 02-03-2005 00:54 usr 15-03-2005 14:31 var 3 File(s) 59,431 bytes 13 Dir(s) 7,269,064,704 bytes free [rbv4531] f:\Programming\svnrepos>cygpath c:\cygwin cygpath c:\cygwin / [rbv4531] f:\Programming\svnrepos>cygpath -w / cygpath -w / C:\cygwin [rbv4531] f:\Programming\svnrepos>ls / ls / ls: /: Permission denied [rbv4531] f:\Programming\svnrepos>cygpath -w /tmp cygpath -w /tmp C:\cygwin\tmp [rbv4531] f:\Programming\svnrepos>dir c:\cygwin\tmp dir c:\cygwin\tmp Volume in drive C is System Volume Serial Number is 58E5-4EED Directory of c:\cygwin\tmp 15-03-2005 17:16 . 15-03-2005 17:16 .. 15-03-2005 14:43 .X11-unix 01-02-2005 09:23 0 cciPNW7d.c 01-02-2005 09:23 13,064 ccmpga8l.ld 01-02-2005 09:23 0 ccqurJ5h.o 15-02-2005 01:10 419,582 colinux-20050212.src.tar.gz 30-01-2005 03:17 1,453 fcgipl.log 15-03-2005 14:43 3,916,720 MultiFileMsg2 15-03-2005 14:43 23,568 MultiFileSem2 15-03-2005 14:43 204,304 MultiFileShm2 15-03-2005 14:43 2,516 NXWin.log 04-02-2005 20:03 29,062 XWin.log 10 File(s) 4,610,269 bytes 3 Dir(s) 7,269,064,704 bytes free [rbv4531] f:\Programming\svnrepos>ls /tmp ls /tmp ls: /tmp: Permission denied [rbv4531] f:\Programming\svnrepos>ls c:\cygwin ls c:\cygwin ls: c:\cygwin: Permission denied [rbv4531] f:\Programming\svnrepos>ls c:\cygwin\tmp ls c:\cygwin\tmp ls: c:\cygwin\tmp: Permission denied [rbv4531] f:\Programming\svnrepos>id id uid=400(SYSTEM) gid=401(mkpasswd) groups=401(mkpasswd) The user and group are listed in /etc/passwd and /etc/group. The account used to work perfectly (it is a subversion server). "type c:\cygwin\etc\passwd" produces output, there's no reason the lookup should fail. I've compiled the portion of cygwin that doesn't require mingw, and I'd be happy to try out any fixes or add debugging output. From strace I get 198 40402 [main] id 988 mount_info::conv_to_win32_path: conv_to_win32_path (/etc/passwd) 183 40585 [main] id 988 set_flags: flags: binary (0x2) 192 40777 [main] id 988 mount_info::conv_to_win32_path: src_path /etc/passwd, dst C:\cygwin\etc\passwd, flags 0xA, rc 0 367 41144 [main] id 988 symlink_info::check: GetFileAttributes (C:\cygwin\etc\passwd) failed 220 41364 [main] id 988 geterrno_from_win_error: windows error 5 == errno 13 305 41669 [main] id 988 symlink_info::check: GetFileAttributes (C:\cygwin\etc\passwd.lnk) failed 299 41968 [main] id 988 geterrno_from_win_error: windows error 5 == errno 13 134 42102 [main] id 988 symlink_info::check: 0 = symlink.check (C:\cygwin\etc\passwd, 0x22E8E0) (0xA) 600 42702 [main] id 988 path_conv::check: this->path(C:\cygwin\etc\passwd), has_acls(1) 399 43101 [main] id 988 etc::test_file_change: FindFirstFile failed, Win32 error 5 1018 44119 [main] id 988 pwdgrp::load: /etc/passwd load failed 451 44570 [main] id 988 cygheap_user::ontherange: what 2, pw 0x0 214 44784 [main] id 988 cygheap_user::ontherange: HOME is already in the environment /cygdrive/f/Programming/svnrepos 626 45410 [main] id 988 pwdgrp::read_passwd: Completing /etc/passwd: SYSTEM:*:400:401:,S-1-5-21-1606980848-602162358-725345543-1023:/cygdrive/f/Programming/svnrepos:/bin/sh 190 45600 [main] id 988 normalize_posix_path: src /etc/group 192 45792 [main] id 988 normalize_posix_path: /etc/group = normalize_posix_path (/etc/group) 182 45974 [main] id 988 mount_info::conv_to_win32_path: conv_to_win32_path (/etc/group) 196 46170 [main] id 988 set_flags: flags: binary (0x2) 182 46352 [main] id 988 mount_info::conv_to_win32_path: src_path /etc/group, dst C:\cygwin\etc\group, flags 0xA, rc 0 382 46734 [main] id 988 symlink_info::check: GetFileAttributes (C:\cygwin\etc\group) failed 233 46967 [main] id 988 geterrno_from_win_error: windows error 5 == errno 13 368 47335 [main] id 988 symlink_info::check: GetFileAttributes (C:\cygwin\etc\group.lnk) failed 319 47654 [main] id 988 geterrno_from_win_error: windows error 5 == errno 13 260 47914 [main] id 988 symlink_info::check: 0 = symlink.check (C:\cygwin\etc\group, 0x22E8A0) (0xA) 188 48102 [main] id 988 path_conv::check: this->path(C:\cygwin\etc\group), has_acls(1) 277 48379 [main] id 988 etc::test_file_change: FindFirstFile failed, Win32 error 5 Ben Voigt -- 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/