Possible disconnect between POSIX and Windows ACL permissions (unspecified Owner/Owning Group (????????) + Win32 Errors during cygcheck, ssh, and other apps...)

John Blum jjbad@dsl-only.net
Thu Jul 1 06:56:00 GMT 2010


I know the problems I am having (noted below) seem the same as issues 
previously posted in the "cygwin" mailing list, but I am not so sure.  I 
have reviewed similar postings and while there are similarities, I also 
feel this problem is somewhat different...

http://sourceware.org/ml/cygwin/2009-11/msg00492.html
http://sourceware.org/ml/cygwin/2009-01/msg00651.html - (also @ 
http://omgili.com/mailinglist/cygwin/cygwin/com/4977B5571070708etr-usacom.html)
http://sourceware.org/ml/cygwin/2009-11/msg00540.html
etc...

I also read the section about NTSEC IDS @...

http://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-ids

/Background:/

Let me just clarify now that I do not believe this is a bug in Cygwin, 
but perhaps an issue with Windows or my environment.  I recently rebuilt 
my computer... installed Windows (XP Professional) with Service Pack 3, 
installed drivers, applied all security updates/patches/etc, and then 
proceeded to install software (such as Cygwin).  After my initial setup, 
I observed strange behavior in Cygwin (see below).

However, just the other day (Monday, June 28th), MS published a security 
update for Windows, so being a "responsible" user, I applied the update, 
rebooted and proceeded to open a Cygwin shell.  To my amazement, Cygwin 
was functioning correctly.  I performed all the noted functions below 
successfully.  However, I noticed I had not installed development tools 
(compilers, scm (cvs), etc), so I updated my Cygwin install.  It again 
broke my Cygwin environment.

/Problem:/

When ever I run an >ls -la, I get the following output...

*jblum@devbox ~*
$ ls -la
ls: .: Invalid argument
ls: ..: Invalid argument
ls: .bashrc: Invalid argument
ls: .bash_history: Invalid argument
ls: .bash_profile: Invalid argument
ls: .inputrc: Invalid argument
ls: bin: Invalid argument
ls: cp: Invalid argument
ls: cygcheck.out: Invalid argument
ls: sqltool.rc: Invalid argument
total 116
drwxr-x--- 1 ???????? ????????     0 2010-06-30 16:59 .
drwxr-x--- 1 ???????? ????????     0 2010-06-30 16:51 ..
-rw-r----- 1 ???????? ????????  6427 2010-06-30 19:54 .bash_history
-rw-r----- 1 ???????? ????????  1237 2010-06-30 16:59 .bash_profile
-rw-r----- 1 ???????? ????????  3772 2010-06-30 16:59 .bashrc
-rw-r----- 1 ???????? ????????  1461 2010-06-30 16:14 .inputrc
drwxr-x--- 1 ???????? ????????     0 2010-06-30 16:57 bin
drwxr-x--- 1 ???????? ????????     0 2010-06-30 16:57 cp
-rw-r----- 1 ???????? ???????? 88322 2010-06-30 17:01 cygcheck.out
-rw-r----- 1 ???????? ????????  5123 2010-06-30 16:57 sqltool.rc

If I execute >vim, I get the following (which proceeds to hang and I 
need to close the Cygwin shell)...

*jblum@devbox ~*
$ vim

E558: Terminal entry not found in terminfo
'cygwin' not known. Available builtin terminals are:
     builtin_riscos
     builtin_amiga
     builtin_beos-ansi
     builtin_ansi
     builtin_pcansi
     builtin_win32
     builtin_vt320
     builtin_vt52
     builtin_xterm
     builtin_iris-ansi
     builtin_debug
     builtin_dumb
defaulting to 'ansi'

When I ssh to another box, and perform some task (like run vim), I run 
into the following Win32 error...

*jblum@devbox ~*
$ ssh jblum@dataserver
jblum@dataserver's password:
*[jblum@dataserver jblum]$* vim

<I proceed to enter SHIFT-:q! to immediately quit the editor and ...>

1 [main] ssh 660 C:\cygwin\bin\ssh.exe: *** fatal error - could not load 
user32, Win32 error 487
Hangup

Also...

*jblum@devbox ~*
$ clear
'cygwin': unknown terminal type.


I believe all these issues are related to the same problem, which I 
think has something to do with Owner/Group-permissions on the Cygwin 
files.  As I said, when I applied a security update issued by MS on 
Monday (6/28), for a short-time before I updated my Cygwin installation, 
Cygwin was functioning correctly and I did not see (*????????*) in place 
of Owner/Group.  I saw (*jblum/None*) and none of the above issues occurred.

I have tried several things...

1.  I reran *mkpasswd -l -c > /etc/passwd *as well as *mkgroup -l -c > 
/etc/group*.  Restared Cygwin, rebooted, etc.

2.  If I run ls -n, I get the following output...

*jblum@devbox ~*
$ ls -n
ls: .: Invalid argument
ls: ..: Invalid argument
ls: .bashrc: Invalid argument
ls: .bash_history: Invalid argument
ls: .bash_profile: Invalid argument
ls: .inputrc: Invalid argument
ls: .ssh: Invalid argument
ls: bin: Invalid argument
ls: cp: Invalid argument
ls: cygcheck.out: Invalid argument
ls: sqltool.rc: Invalid argument
total 116
drwxr-x--- 1 4294967295 4294967295     0 2010-06-30 20:21 .
drwxr-x--- 1 4294967295 4294967295     0 2010-06-30 16:51 ..
-rw-r----- 1 4294967295 4294967295  6343 2010-06-30 20:20 .bash_history
-rw-r----- 1 4294967295 4294967295  1237 2010-06-30 16:59 .bash_profile
-rw-r----- 1 4294967295 4294967295  3772 2010-06-30 16:59 .bashrc
-rw-r----- 1 4294967295 4294967295  1461 2010-06-30 16:14 .inputrc
drwxr-x--- 1 4294967295 4294967295     0 2010-06-30 20:21 .ssh
drwxr-x--- 1 4294967295 4294967295     0 2010-06-30 16:57 bin
drwxr-x--- 1 4294967295 4294967295     0 2010-06-30 16:57 cp
-rw-r----- 1 4294967295 4294967295 88322 2010-06-30 17:01 cygcheck.out
-rw-r----- 1 4294967295 4294967295  5123 2010-06-30 16:57 sqltool.rc

Obviously, based on the section "Special values of user and group ids" 
in the Cygwin user guide, it would seem that the Owner and Group of 
files are not in the etc/passwd and /etc/group files respectively.  
However, that is simply not true.  If I take one file, for instance, and 
run...

*jblum@devbox ~*
$ getfacl .bash_profile
# file: .bash_profile
# owner: jblum
# group: None
user::rwx
group::rwx
mask:rwx
other:rwx

I can see that the Owner is jblum (my user) and the group is none with 
somewhat appropriate permissions.  I am logged into Windows as jblum.  
When I access the Cygwin shell I am jblum.  I exists in the /etc/passwd 
file and am a member of the appropriate groups...

*jblum@devbox ~*
$ whoami
jblum

$ groups
None Administrators Users

$ id
uid=1003(jblum) gid=513(None) 
groups=513(None),544(Administrators),545(Users)

The contents of both the */etc/passwd* and */etc/group* files are as 
follows...

*jblum@devbox ~*
$ cat /etc/passwd

SYSTEM:*:18:544:,S-1-5-18::
LocalService:*:19:544:U-NT AUTHORITY\LocalService,S-1-5-19::
NetworkService:*:20:544:U-NT AUTHORITY\NetworkService,S-1-5-20::
Administrators:*:544:544:,S-1-5-32-544::
Administrator:unused:500:513:U-DEVBOX\Administrator,S-1-5-21-1275210071-1580818891-682003330-500:/ho
me/Administrator:/bin/bash
ASPNET:unused:1005:513:ASP.NET Machine 
Account,U-DEVBOX\ASPNET,S-1-5-21-1275210071-1580818891-682003
330-1005:/home/ASPNET:/bin/bash
Guest:unused:501:513:U-DEVBOX\Guest,S-1-5-21-1275210071-1580818891-682003330-501:/home/Guest:/bin/ba
sh
HelpAssistant:unused:1000:513:Remote Desktop Help Assistant 
Account,U-DEVBOX\HelpAssistant,S-1-5-21-
1275210071-1580818891-682003330-1000:/home/HelpAssistant:/bin/bash
*jblum:unused:1003:513:John J. 
Blum,U-DEVBOX\jblum,S-1-5-21-1275210071-1580818891-682003330-1003:/hom
e/jblum:/bin/bash
*sblum:unused:1004:513:Sara E. 
Blum,U-DEVBOX\sblum,S-1-5-21-1275210071-1580818891-682003330-1004:/hom
e/sblum:/bin/bash
SUPPORT_388945a0:unused:1002:513:CN=Microsoft 
Corporation,L=Redmond,S=Washington,C=US,U-DEVBOX\SUPPO
RT_388945a0,S-1-5-21-1275210071-1580818891-682003330-1002:/home/SUPPORT_388945a0:/bin/bash

$ cat /etc/group
SYSTEM:S-1-5-18:18:
Administrators:S-1-5-32-544:544:
Backup Operators:S-1-5-32-551:551:
Guests:S-1-5-32-546:546:
Network Configuration Operators:S-1-5-32-556:556:
Power Users:S-1-5-32-547:547:
Remote Desktop Users:S-1-5-32-555:555:
Replicator:S-1-5-32-552:552:
Users:S-1-5-32-545:545:
HelpServicesGroup:S-1-5-21-1275210071-1580818891-682003330-1001:1001:
*None:S-1-5-21-1275210071-1580818891-682003330-513:513:*

This led me to believe that maybe the SIDs of the Owner and Group of the 
files were still somehow different and not present in the passwd and 
group files respectively, so I ran SetACL (sourceforce.org project) 
based on another posting I came across, which output the following...

*jblum@devbox ~*
$ SetACL -on .bash_profile -ot file -actn list -lst "f:*sddl*;w:d,s,o,g"

".bash_profile",1,"O:S-1-5-21-1275210071-1580818891-682003330-1003G:S-1-5-21-1275210071-1580818891-6
82003330-513D:(A;;FA;;;S-1-5-21-1275210071-1580818891-682003330-1003)(A;;0x1201bf;;;S-1-5-21-1275210
071-1580818891-682003330-513)(A;;0x1201bf;;;WD)"

SetACL finished successfully.

$ SetACL -on .bash_profile -ot file -actn list -lst "f:*tab*;w:d,s,o,g"
.bash_profile

    Owner: DEVBOX\jblum

    Group: DEVBOX\None

    DACL(not_protected):
    DEVBOX\jblum   full   allow   no_inheritance
    DEVBOX\None   write   allow   no_inheritance
    Everyone   write   allow   no_inheritance


SetACL finished successfully.

Or, if I just run the following...

*jblum@devbox ~*
$ cacls .bash_profile
C:\cygwin\home\jblum\.bash_profile DEVBOX\jblum:F
                                    DEVBOX\None:(special access:)
                                                READ_CONTROL
                                                SYNCHRONIZE
                                                FILE_GENERIC_READ
                                                FILE_GENERIC_WRITE
                                                FILE_GENERIC_EXECUTE
                                                FILE_READ_DATA
                                                FILE_WRITE_DATA
                                                FILE_APPEND_DATA
                                                FILE_READ_EA
                                                FILE_WRITE_EA
                                                FILE_EXECUTE
                                                FILE_READ_ATTRIBUTES
                                                FILE_WRITE_ATTRIBUTES

                                    Everyone:(special access:)
                                             READ_CONTROL
                                             SYNCHRONIZE
                                             FILE_GENERIC_READ
                                             FILE_GENERIC_WRITE
                                             FILE_GENERIC_EXECUTE
                                             FILE_READ_DATA
                                             FILE_WRITE_DATA
                                             FILE_APPEND_DATA
                                             FILE_READ_EA
                                             FILE_WRITE_EA
                                             FILE_EXECUTE
                                             FILE_READ_ATTRIBUTES
                                             FILE_WRITE_ATTRIBUTES

Everything appears to be in order.  I have done the following...

1.  Right-clicked, opened the properties dialog, clicked Security tab, 
verified authorized users and Windows permissions.

2.  I have changed my */etc/fstab *file to include the *noacl* option in 
mount commands to my devices.  Current mount is...

*jblum@devbox ~*
$ mount
C:/cygwin/bin on /usr/bin type ntfs (binary,auto)
C:/cygwin/lib on /usr/lib type ntfs (binary,auto)
C:/cygwin on / type ntfs (binary,auto)
C: on /cygdrive/c type ntfs (binary,posix=0,user,noumount,auto)
D: on /cygdrive/d type ntfs (binary,posix=0,user,noumount,auto)
E: on /cygdrive/e type ntfs (binary,posix=0,user,noumount,auto)
F: on /cygdrive/f type ntfs (binary,posix=0,user,noumount,auto)
G: on /cygdrive/g type ntfs (binary,posix=0,user,noumount,auto)
H: on /cygdrive/h type ntfs (binary,posix=0,user,noumount,auto)

3.  I have uninstalled (deleted the cygwin directory, deleted registry 
entries, etc) and reinstalled multiple times.

4.  I reinstalled as the Administrator of the machine.

5. I have reinstalled an older version of Cygwin (cygwin1.dll version 
1.5.25-15) based on an older install... same problem.

6.  I have mucked with the group setting of my user (jblum) in the 
passwd file, setting to Administrator (544), as I am a member of the 
Administrator group in Windows.

7. Simple put, I am out of ideas....

I am attaching the *cygcheck *output for further details about my 
environment.  Interestingly enough, when I run cygcheck, I get the 
following error as well...

*jblum@devbox ~*
$ cygcheck -svr > cygcheck.out
     1 [main] id 6644 C:\cygwin\bin\id.exe: *** fatal error - could not 
load user32, Win32 error 487
garbled output from 'id' command - no uid= found

Thanks for any help in advance and insight into what I might be 
missing.  I am certain this is a user (loser) error.

Thank you,

-- 
John Blum
/Software Solutions Consultant/
Codeprimate LLC *
*
<email:jblum0@gmail.com>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cygcheck.out
URL: <http://cygwin.com/pipermail/cygwin/attachments/20100701/c03ac86d/attachment.ksh>
-------------- next part --------------
--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


More information about the Cygwin mailing list