public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* cacls combination problem in 1.7.35, merging privs of existing file & privs of process
@ 2015-06-20 18:42 John Ruckstuhl
  2015-06-22 21:15 ` John Ruckstuhl
  0 siblings, 1 reply; 4+ messages in thread
From: John Ruckstuhl @ 2015-06-20 18:42 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 7256 bytes --]

I'm noticing this summer, that whenever I try to edit an existing file with vi for the first time, the file's permissions change.  Could this be a problem with merging permissions of existing file and permissions of the vi process?
Original cacls of file try2.txt:
    try2.txt INTSURG\johnru:(R,W,D,WDAC,WO)
             INTSURG\Domain Users:(R)
             Everyone:(R)
             NT AUTHORITY\SYSTEM:(F)
             BUILTIN\Administrators:(F)
Cacls after vi open & write back out (":wq")
    try2.txt INTSURG\johnru:(DENY)(S,X)
             INTSURG\johnru:(R,W,D,WDAC,WO)
             INTSURG\Domain Users:(RX,W)
             Everyone:(R)
             NT AUTHORITY\SYSTEM:(RX,W)
             BUILTIN\Administrators:(RX,W)
Note 1 added deny line, and 3 lines changed from (R) or (F), to (RX,W).

Or see differing getfacl output... try1.txt is a fresh file, try2.txt is a file re-written by vi session:
    johnru@JohnRu-L1 ~/Desktop/dev NSIS/foul
    $ getfacl . try*
    # file: .
    # owner: johnru
    # group: Domain Users
    user::rwx
    group::r-x
    group:SYSTEM:rwx
    group:Administrators:rwx
    mask:rwx
    other:r-x
    default:user::rwx
    default:group::r-x
    default:group:SYSTEM:rwx
    default:group:Administrators:rwx
    default:mask:rwx
    default:other:r-x

    # file: try1.txt
    # owner: johnru
    # group: Domain Users
    user::rw-
    group::r--
    group:SYSTEM:rwx
    group:Administrators:rwx
    mask:rwx
    other:r--

    # file: try2.txt
    # owner: johnru
    # group: Domain Users
    user::rw-
    group::rwx
    group:SYSTEM:rwx
    group:Administrators:rwx
    mask:rwx
    other:r--


From the same shell, writing out a file by two techniques yields different cacls.
Please help me understand the phenomenon.
I am suspecting vi (or a library it calls) which tries to combine existing privileges of a file with the privs of the vi process, to generate privileges of the new file created on ":w".
I am not asking for this behavior to be changed, and yes I'm expecting the behavior is different with Cygwin 2.0 . 
I am just trying to understand what is happening here, and which sw app or library is defining this behavior.  Is it vi?  Is it the cygwin1.dll?
Sorry, I am using the terms privilege, permission, and cacl interchangeably out of ignorance. 
Also, I have tried to read https://cygwin.com/cygwin-ug-net/ntsec.html .  Sorry, I don't see that it documents this phenomenon.  I looked in mailing-list archives, and I couldn't connect the dots.  Again this is 1.7.35 .
cygcheck.out is attached.
id.out is attached.

Use case:
I create a file by redirecting stdout to a file.
Then I open in vi and write it back out (":wq") and its cacls have changed.  Notably, as you can see, I no longer have "execute" permission.
Is this a feature of vi, of bash, or of cygwin?

It seems like bash & vi are using different techniques for determining how to specify the cacls of a new file (vi creating a new file on write).  
I know that over the past six months, cygwin handling of acls has been a topic of discussion.
Also note, 
(a) this is on my C drive, under my Desktop, not on some remote fileserver.  
(b) Windows 7. 
(c) my IT dept routinely gives power-users Window Administrator privileges, so I have that, even though I'm not sure I want that attached to my day-to-day account.
(d) while I am making these observations, I am at home, not on my domain network.

Below, my control case is try1.txt, and my experiment is try2.txt (see Footnote [1]).

Hmmm what if I write a new file with vi (instead of rewriting a file).  
Ahhh, In the new file case, vi writes file with same cacls as a fresh file written by shell redirect.
Maybe what I'm observing is vi is trying to respect the original cacls when creating the updated file.
So it's a problem with vi's attempt to combine the files original cacls with vi's notion of the privileges of its own process... (see Footnote [2])

Footnotes
[1]
johnru@JohnRu-L1 ~/Desktop/dev NSIS/foul
$ icacls .
. INTSURG\johnru:(F)
  INTSURG\Domain Users:(RX)
  Everyone:(RX)
  NT AUTHORITY\SYSTEM:(OI)(CI)(F)
  BUILTIN\Administrators:(OI)(CI)(F)
  CREATOR OWNER:(OI)(CI)(IO)(F)
  CREATOR GROUP:(OI)(CI)(IO)(RX)
  Everyone:(OI)(CI)(IO)(RX)

Successfully processed 1 files; Failed processing 0 files

johnru@JohnRu-L1 ~/Desktop/dev NSIS/foul
$ date > try1.txt

johnru@JohnRu-L1 ~/Desktop/dev NSIS/foul
$ date > try2.txt

johnru@JohnRu-L1 ~/Desktop/dev NSIS/foul
$ icacls try1.txt; icacls try2.txt
try1.txt INTSURG\johnru:(R,W,D,WDAC,WO)
         INTSURG\Domain Users:(R)
         Everyone:(R)
         NT AUTHORITY\SYSTEM:(F)
         BUILTIN\Administrators:(F)

Successfully processed 1 files; Failed processing 0 files
try2.txt INTSURG\johnru:(R,W,D,WDAC,WO)
         INTSURG\Domain Users:(R)
         Everyone:(R)
         NT AUTHORITY\SYSTEM:(F)
         BUILTIN\Administrators:(F)

Successfully processed 1 files; Failed processing 0 files

(now edit file "try2.txt", and write it back out ":wq")
johnru@JohnRu-L1 ~/Desktop/dev NSIS/foul
$ vi try2.txt

(cacls have been changed! )
johnru@JohnRu-L1 ~/Desktop/dev NSIS/foul
$ icacls try1.txt; icacls try2.txt
try1.txt INTSURG\johnru:(R,W,D,WDAC,WO)
         INTSURG\Domain Users:(R)
         Everyone:(R)
         NT AUTHORITY\SYSTEM:(F)
         BUILTIN\Administrators:(F)

Successfully processed 1 files; Failed processing 0 files
try2.txt INTSURG\johnru:(DENY)(S,X)
         INTSURG\johnru:(R,W,D,WDAC,WO)
         INTSURG\Domain Users:(RX,W)
         Everyone:(R)
         NT AUTHORITY\SYSTEM:(RX,W)
         BUILTIN\Administrators:(RX,W)

Successfully processed 1 files; Failed processing 0 files

johnru@JohnRu-L1 ~/Desktop/dev NSIS/foul
$ ls -la
total 6
drwxrwxr-x+ 1 johnru         Domain Users  0 Jun 20 09:34 .
drwxrwx---+ 1 Administrators Domain Users  0 Jun 20 09:32 ..
-rw-rwxr--+ 1 johnru         Domain Users 30 Jun 20 09:33 try1.txt
-rw-rwxr--+ 1 johnru         Domain Users 30 Jun 20 09:34 try2.txt


[2] file "try3.txt" doesn't exist yet.  Using vi to create it with the following command
johnru@JohnRu-L1 ~/Desktop/dev NSIS/foul
$ vi try3.txt

johnru@JohnRu-L1 ~/Desktop/dev NSIS/foul
$ icacls try3.txt
try3.txt INTSURG\johnru:(R,W,D,WDAC,WO)
         INTSURG\Domain Users:(R)
         Everyone:(R)
         NT AUTHORITY\SYSTEM:(F)
         BUILTIN\Administrators:(F)

Successfully processed 1 files; Failed processing 0 files

johnru@JohnRu-L1 ~/Desktop/dev NSIS/foul
$ icacls try3.txt
try3.txt INTSURG\johnru:(R,W,D,WDAC,WO)
         INTSURG\Domain Users:(R)
         Everyone:(R)
         NT AUTHORITY\SYSTEM:(F)
         BUILTIN\Administrators:(F)

Successfully processed 1 files; Failed processing 0 files

johnru@JohnRu-L1 ~/Desktop/dev NSIS/foul
$ vi try3.txt

johnru@JohnRu-L1 ~/Desktop/dev NSIS/foul
$ icacls try3.txt
try3.txt INTSURG\johnru:(DENY)(S,X)
         INTSURG\johnru:(R,W,D,WDAC,WO)
         INTSURG\Domain Users:(RX,W)
         Everyone:(R)
         NT AUTHORITY\SYSTEM:(RX,W)
         BUILTIN\Administrators:(RX,W)

Successfully processed 1 files; Failed processing 0 files




[-- Attachment #2: cygcheck.out --]
[-- Type: application/octet-stream, Size: 29453 bytes --]


Cygwin Configuration Diagnostics
Current System Time: Sat Jun 20 18:40:25 2015

Windows 7 Enterprise Ver 6.1 Build 7601 Service Pack 1

Path:	C:\cygwin64\usr\local\bin
	C:\cygwin64\bin
	C:\Program Files\Common Files\Microsoft Shared\Microsoft Online Services
	C:\Program Files (x86)\Common Files\Microsoft Shared\Microsoft Online Services
	C:\Windows\system32
	C:\Windows
	C:\Windows\System32\Wbem
	C:\Windows\System32\WindowsPowerShell\v1.0
	C:\Program Files\MATLAB\R2010b\runtime\win32
	C:\Program Files\MATLAB\R2010b\bin
	C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn
	C:\Program Files\Microsoft SQL Server\100\Tools\Binn
	C:\Program Files\Microsoft SQL Server\100\DTS\Binn
	C:\Program Files\TortoiseSVN\bin
	C:\Program Files (x86)\Subversion\bin
	C:\Program Files (x86)\MATLAB\MATLAB Compiler Runtime\v714\runtime\win32
	C:\Program Files (x86)\GNU\GnuPG\pub
	C:\Program Files (x86)\Calibre2
	C:\Program Files (x86)\QuickTime\QTSystem
	.

Output from C:\cygwin64\bin\id.exe
UID: 1158474(johnru)
GID: 1049089(Domain Users)
1049089(Domain Users)
544(Administrators)
545(Users)
4(INTERACTIVE)
66049(CONSOLE LOGON)
11(Authenticated Users)
15(This Organization)
4095(CurrentSession)
66048(LOCAL)
1058289(Corporate Employees)
1070479(MRM Test)
1070036(MFGREF_4400_4500 RW)
1068060(Xfer_Clinical Publications RO)
1095259(RD-Field_Uploads)
1050783(Remote Users)
1063659(VersionCtrlTeam MFG)
1058389(SAP-Users)
1050178(MechanicalEng)
1063402(SHP-XSIEMPLOYEES-INFOWEB-ACCESS)
1072570(ppm_users)
1159809(DTE_LEVEL_DEVELOPER)
1049749(Sposables)
1066046(International Training RO)
1163978(Q215.Mfg.ServReg.D2)
1049995(Manufacturing)
1161353(RDS-MBAM-Selfhelp)
1065101(Newpub_engineering RW)
1091141(mfg_ref-Admin)
1069010(MX-MFG-RO)
1065052(Instrument PQA RW)
1058040(Engineering Group)
1065361(Procust_SolidWorks_XSITemplates RO)
1053611(Test Engineering)
1062808(Marketing_Product_Marketing_G2.0)
1159216(RO-pub)
1062690(ME Project Signup)
1158728(RemoteFeUsers)
1169261(Citrix_XA_InternalUsers)
1053642(Software Engineering)
1064958(Endoluminal Group)
1058649(Test Group)
1154075(RDS-DallasDB)
1053639(Mechanical Eng)
1147516(APP-V-Clients)
1084721(Internal Users)
1147103(MKS_Users)
1155174(XSGK(RO))
1083835(NPI_Svcs-RO)
1159724(CH-Design-Studio)
1064806(Research_WO)
1148634(RDS-Infoweb)
1054814(TRACKIT)
1064755(Engineering_Projects RW)
1066067(International Policies RO)
1091142(mfg_ref-Modify)
1161509(RW-sales_pub)
1071673(SSL_RAS)
1073787(isi-goleta1-Spch-ful)
1064795(950 Sunnyvale)
1146328(Mimic_Drylab_Exercises_RW)
1160663(Stash_Users)
1053658(Mountain View Employ)
1052635(ManufacturingEng)
1164816(SAPGUI-User)
1071377(ADP Training RO)
1155273(RDS-SAPLogonPad)
1083394(RDS_Access)
1071675(SSL_Engineers)
1083071(GPO-ExchCachedMode)
1073887(Xray Operations)
1151201(XSGK QMS RO)
1145691(OrionInstruments-RO)
1069011(MX-MFG-RW)
1160660(Jira_Full_Users)
1169257(Citrix_XA_ISMES)
1073583(Agile_Users)
1050174(daVinci Development)
1064790(Patent Status RO)
1078944(xfer_marketing rw)
1170820(PM 2015 Employees)
1053673(XSI Employees - US)
1052636(Engineering)
1160661(Confluence_Users)
1160561(Matlab-Sec)
1067284(NEWPUB Share)
1169336(Citrix_XA_SAP_GUI)
1160904(CIP-WIN-Non-Sales)
1068450(1266 Kifer Bldg.102)
1053634(Xray E)
405504(High Mandatory Level)

SysDir: C:\Windows\system32
WinDir: C:\Windows

USER = 'johnru'
PWD = '/cygdrive/c/Users/johnru/home/Desktop/dev NSIS/foul'
HOME = '/cygdrive/c/Users/johnru/home'

HOMEPATH = '\'
APPDATA = 'C:\Users\johnru\AppData\Roaming'
ProgramW6432 = 'C:\Program Files'
HOSTNAME = 'JohnRu-L1'
SHELL = '/bin/bash'
TERM = 'xterm'
PROCESSOR_IDENTIFIER = 'Intel64 Family 6 Model 60 Stepping 3, GenuineIntel'
PROFILEREAD = 'true'
WINDIR = 'C:\Windows'
PUBLIC = 'C:\Users\Public'
OLDPWD = '/cygdrive/c/Users/johnru/home/Desktop/dev NSIS'
ORIGINAL_PATH = '/cygdrive/c/Program Files/Common Files/Microsoft Shared/Microsoft Online Services:/cygdrive/c/Program Files (x86)/Common Files/Microsoft Shared/Microsoft Online Services:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/c/Program Files/MATLAB/R2010b/runtime/win32:/cygdrive/c/Program Files/MATLAB/R2010b/bin:/cygdrive/c/Program Files (x86)/Microsoft SQL Server/100/Tools/Binn:/cygdrive/c/Program Files/Microsoft SQL Server/100/Tools/Binn:/cygdrive/c/Program Files/Microsoft SQL Server/100/DTS/Binn:/cygdrive/c/Program Files/TortoiseSVN/bin:/cygdrive/c/Program Files (x86)/Subversion/bin:/cygdrive/c/Program Files (x86)/MATLAB/MATLAB Compiler Runtime/v714/runtime/win32:/cygdrive/c/Program Files (x86)/GNU/GnuPG/pub:/cygdrive/c/Program Files (x86)/Calibre2:/cygdrive/c/Program Files (x86)/QuickTime/QTSystem:.'
USERDOMAIN = 'INTSURG'
CommonProgramFiles(x86) = 'C:\Program Files (x86)\Common Files'
OS = 'Windows_NT'
ALLUSERSPROFILE = 'C:\ProgramData'
windows_tracing_flags = '3'
windows_tracing_logfile = 'C:\BVTBin\Tests\installpackage\csilogfile.log'
SecSpecialMode = '710916'
APR_ICONV_PATH = 'C:\Program Files (x86)\Subversion\iconv'
!:: = '::\'
TEMP = '/tmp'
DEFLOGDIR = 'C:\ProgramData\McAfee\DesktopProtection'
COMMONPROGRAMFILES = 'C:\Program Files\Common Files'
USERNAME = 'johnru'
PROCESSOR_LEVEL = '6'
ProgramFiles(x86) = 'C:\Program Files (x86)'
PSModulePath = 'C:\Windows\system32\WindowsPowerShell\v1.0\Modules\'
FP_NO_HOST_CHECK = 'NO'
SYSTEMDRIVE = 'C:'
LANG = 'en_US.UTF-8'
USERPROFILE = 'C:\Users\johnru'
ERLANG_HOME = 'C:\Program Files\erl6.0'
TZ = 'America/Los_Angeles'
PS1 = '\[\e]0;\w\a\]\n\[\e[32m\]\u@\h \[\e[33m\]\w\[\e[0m\]\n\$ '
LOGONSERVER = '\\SV101-DC1'
CommonProgramW6432 = 'C:\Program Files\Common Files'
PROCESSOR_ARCHITECTURE = 'AMD64'
LOCALAPPDATA = 'C:\Users\johnru\AppData\Local'
ProgramData = 'C:\ProgramData'
EXECIGNORE = '*.dll'
SHLVL = '1'
USERDNSDOMAIN = 'CORP.XRAY.COM'
PATHEXT = '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC'
HOMEDRIVE = 'H:'
COMSPEC = 'C:\Windows\system32\cmd.exe'
TMP = '/tmp'
SYSTEMROOT = 'C:\Windows'
PRINTER = 'XP-600 Series(Network)'
PROCESSOR_REVXSION = '3c03'
VS100COMNTOOLS = 'c:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Tools\'
INFOPATH = '/usr/local/info:/usr/share/info:/usr/info'
PROGRAMFILES = 'C:\Program Files'
HOMESHARE = '\\hq-isilon1\home$\JohnRu'
NUMBER_OF_PROCESSORS = '8'
VSEDEFLOGDIR = 'C:\ProgramData\McAfee\DesktopProtection'
asl.log = 'Destination=file'
SESSIONNAME = 'Console'
COMPUTERNAME = 'JOHNRU-L1'
_ = '/usr/bin/cygcheck'

HKEY_CURRENT_USER\Software\Cygwin
HKEY_CURRENT_USER\Software\Cygwin\Program Options
HKEY_LOCAL_MACHINE\SOFTWARE\Cygwin
HKEY_LOCAL_MACHINE\SOFTWARE\Cygwin\Installations
  (default) = '\??\C:\cygwin64'
HKEY_LOCAL_MACHINE\SOFTWARE\Cygwin\Program Options
HKEY_LOCAL_MACHINE\SOFTWARE\Cygwin\setup
  (default) = 'C:\cygwin64'

obcaseinsensitive set to 1

Cygwin installations found in the registry:
  System: Key: e022582115c10879 Path: C:\cygwin64

c:  hd  NTFS    243845Mb  50% CP CS UN PA FC     
d:  cd             N/A    N/A                    
h:  net            N/A    N/A                    
k:  net            N/A    N/A                    
m:  net            N/A    N/A                    
n:  net            N/A    N/A                    
p:  net            N/A    N/A                    
q:  net            N/A    N/A                    
t:  net            N/A    N/A                    
u:  net            N/A    N/A                    
x:  net            N/A    N/A                    

C:\cygwin64      /          system  binary,auto
C:\cygwin64\bin  /usr/bin   system  binary,auto
C:\cygwin64\lib  /usr/lib   system  binary,auto
cygdrive prefix  /cygdrive  user    binary,posix=0,auto

Found: C:\cygwin64\bin\awk
 -> C:\cygwin64\bin\gawk.exe
Found: C:\cygwin64\bin\bash.exe
Found: C:\cygwin64\bin\cat.exe
Found: C:\cygwin64\bin\cp.exe
Not Found: cpp (good!)
Not Found: crontab
Found: C:\cygwin64\bin\find.exe
Found: C:\Windows\system32\find.exe
Warning: C:\cygwin64\bin\find.exe hides C:\Windows\system32\find.exe
Not Found: gcc
Not Found: gdb
Found: C:\cygwin64\bin\grep.exe
Found: C:\cygwin64\bin\kill.exe
Found: C:\cygwin64\bin\ld.exe
Found: C:\cygwin64\bin\ls.exe
Found: C:\cygwin64\bin\make.exe
Found: C:\cygwin64\bin\mv.exe
Not Found: patch
Found: C:\cygwin64\bin\perl.exe
Found: C:\cygwin64\bin\rm.exe
Found: C:\cygwin64\bin\sed.exe
Not Found: ssh
Found: C:\cygwin64\bin\sh.exe
Found: C:\cygwin64\bin\tar.exe
Found: C:\cygwin64\bin\test.exe
Found: C:\cygwin64\bin\vi.exe
Found: C:\cygwin64\bin\vim.exe

   38k 2013/07/19 C:\cygwin64\bin\cygargp-0.dll - os=4.0 img=0.0 sys=5.2
                  "cygargp-0.dll" v0.0 ts=2013-07-19 15:07
   16k 2013/03/26 C:\cygwin64\bin\cygattr-1.dll - os=4.0 img=0.0 sys=5.2
                  "cygattr-1.dll" v0.0 ts=2013-03-26 18:26
  180k 2015/03/23 C:\cygwin64\bin\cygblkid-1.dll - os=4.0 img=0.0 sys=5.2
                  "cygblkid-1.dll" v0.0 ts=2015-03-23 09:46
   64k 2013/03/07 C:\cygwin64\bin\cygbz2-1.dll - os=4.0 img=0.0 sys=5.2
                  "cygbz2-1.dll" v0.0 ts=2013-03-07 02:54
 1064k 2015/01/12 C:\cygwin64\bin\cygcairo-2.dll - os=4.0 img=0.0 sys=5.2
                  "cygcairo-2.dll" v0.0 ts=2015-01-12 02:54
   27k 2015/01/12 C:\cygwin64\bin\cygcairo-gobject-2.dll - os=4.0 img=0.0 sys=5.2
                  "cygcairo-gobject-2.dll" v0.0 ts=2015-01-12 02:54
  118k 2015/01/12 C:\cygwin64\bin\cygcairo-script-interpreter-2.dll - os=4.0 img=0.0 sys=5.2
                  "cygcairo-script-interpreter-2.dll" v0.0 ts=2015-01-12 02:54
   13k 2013/03/06 C:\cygwin64\bin\cygcatgets1.dll - os=4.0 img=0.0 sys=5.2
                  "cygcatgets1.dll" v0.0 ts=2013-03-06 14:34
   13k 2015/03/19 C:\cygwin64\bin\cygcom_err-2.dll - os=4.0 img=0.0 sys=5.2
                  "cygcom_err-2.dll" v0.0 ts=2015-03-19 02:44
    9k 2013/03/07 C:\cygwin64\bin\cygcrypt-0.dll - os=4.0 img=0.0 sys=5.2
                  "cygcrypt-0.dll" v0.0 ts=2013-03-07 09:29
 2213k 2015/03/19 C:\cygwin64\bin\cygcrypto-1.0.0.dll - os=4.0 img=0.0 sys=5.2
                  "cygcrypto-1.0.0.dll" v0.0 ts=2015-03-19 16:49
  428k 2015/02/26 C:\cygwin64\bin\cygcurl-4.dll - os=4.0 img=0.0 sys=5.2
                  "cygcurl-4.dll" v0.0 ts=2015-02-26 19:34
 1526k 2013/03/08 C:\cygwin64\bin\cygdb-5.3.dll - os=4.0 img=0.0 sys=5.2
                  "cygdb-5.3.dll" v0.0 ts=2013-03-08 07:55
  111k 2013/03/08 C:\cygwin64\bin\cygdb_cxx-5.3.dll - os=4.0 img=0.0 sys=5.2
                  "cygdb_cxx-5.3.dll" v0.0 ts=2013-03-08 07:56
  472k 2013/03/08 C:\cygwin64\bin\cygdb_sql-5.3.dll - os=4.0 img=0.0 sys=5.2
                  "cygdb_sql-5.3.dll" v0.0 ts=2013-03-08 07:58
   68k 2015/01/13 C:\cygwin64\bin\cygEGL-1.dll - os=4.0 img=0.0 sys=5.2
                  "cygEGL-1.dll" v0.0 ts=2015-01-13 10:00
  147k 2013/07/31 C:\cygwin64\bin\cygexpat-1.dll - os=4.0 img=0.0 sys=5.2
                  "cygexpat-1.dll" v0.0 ts=2013-07-31 22:53
   30k 2014/10/14 C:\cygwin64\bin\cygfam-0.dll - os=4.0 img=0.0 sys=5.2
                  "cygfam-0.dll" v0.0 ts=2014-10-14 21:33
   26k 2015/01/11 C:\cygwin64\bin\cygffi-6.dll - os=4.0 img=0.0 sys=5.2
                  "cygffi-6.dll" v0.0 ts=2015-01-11 09:25
  217k 2015/01/02 C:\cygwin64\bin\cygfontconfig-1.dll - os=4.0 img=0.0 sys=5.2
                  "cygfontconfig-1.dll" v0.0 ts=2015-01-02 03:41
   57k 2015/04/13 C:\cygwin64\bin\cygformw-10.dll - os=4.0 img=0.0 sys=5.2
                  "cygformw-10.dll" v0.0 ts=2015-04-13 07:51
  585k 2015/01/26 C:\cygwin64\bin\cygfreetype-6.dll - os=4.0 img=0.0 sys=5.2
                  "cygfreetype-6.dll" v0.0 ts=2015-01-26 17:15
   69k 2015/03/02 C:\cygwin64\bin\cyggcc_s-seh-1.dll - os=4.0 img=0.0 sys=5.2
                  "cyggcc_s-seh-1.dll" v0.0 ts=2015-03-02 20:43
   40k 2014/05/27 C:\cygwin64\bin\cyggdbm-4.dll - os=4.0 img=0.0 sys=5.2
                  "cyggdbm-4.dll" v0.0 ts=1970-01-01 00:00
   13k 2014/05/27 C:\cygwin64\bin\cyggdbm_compat-4.dll - os=4.0 img=0.0 sys=5.2
                  "cyggdbm_compat-4.dll" v0.0 ts=1970-01-01 00:00
 1244k 2015/03/12 C:\cygwin64\bin\cyggio-2.0-0.dll - os=4.0 img=0.0 sys=5.2
                  "cyggio-2.0-0.dll" v0.0 ts=2015-03-12 06:25
  594k 2015/01/13 C:\cygwin64\bin\cygGL-1.dll - os=4.0 img=0.0 sys=5.2
                  "cygGL-1.dll" v0.0 ts=2015-01-13 10:00
  250k 2015/01/13 C:\cygwin64\bin\cygglapi-0.dll - os=4.0 img=0.0 sys=5.2
                  "cygglapi-0.dll" v0.0 ts=2015-01-13 09:53
  956k 2015/03/12 C:\cygwin64\bin\cygglib-2.0-0.dll - os=4.0 img=0.0 sys=5.2
                  "cygglib-2.0-0.dll" v0.0 ts=2015-03-12 06:21
   14k 2015/03/12 C:\cygwin64\bin\cyggmodule-2.0-0.dll - os=4.0 img=0.0 sys=5.2
                  "cyggmodule-2.0-0.dll" v0.0 ts=2015-03-12 06:21
  520k 2015/01/26 C:\cygwin64\bin\cyggmp-10.dll - os=4.0 img=0.0 sys=5.2
                  "cyggmp-10.dll" v0.0 ts=2015-01-26 16:08
  281k 2015/03/12 C:\cygwin64\bin\cyggobject-2.0-0.dll - os=4.0 img=0.0 sys=5.2
                  "cyggobject-2.0-0.dll" v0.0 ts=2015-03-12 06:22
  255k 2015/02/22 C:\cygwin64\bin\cyggssapi_krb5-2.dll - os=4.0 img=0.0 sys=5.2
                  "cyggssapi_krb5-2.dll" v0.0 ts=2015-02-22 10:05
    9k 2015/03/12 C:\cygwin64\bin\cyggthread-2.0-0.dll - os=4.0 img=0.0 sys=5.2
                  "cyggthread-2.0-0.dll" v0.0 ts=2015-03-12 06:21
  691k 2013/04/22 C:\cygwin64\bin\cygguile-17.dll - os=4.0 img=0.0 sys=5.2
                  "cygguile-17.dll" v0.0 ts=2013-04-22 03:15
   30k 2015/01/27 C:\cygwin64\bin\cyghistory7.dll - os=4.0 img=0.0 sys=5.2
                  "cyghistory7.dll" v0.0 ts=2015-01-27 03:51
 1009k 2015/02/20 C:\cygwin64\bin\cygiconv-2.dll - os=4.0 img=0.0 sys=5.2
                  "cygiconv-2.dll" v0.0 ts=2015-02-20 17:07
  196k 2014/12/06 C:\cygwin64\bin\cygidn-11.dll - os=4.0 img=0.0 sys=5.2
                  "cygidn-11.dll" v0.0 ts=2014-12-06 13:17
   40k 2015/02/20 C:\cygwin64\bin\cygintl-8.dll - os=4.0 img=0.0 sys=5.2
                  "cygintl-8.dll" v0.0 ts=2015-02-20 18:01
   48k 2014/06/17 C:\cygwin64\bin\cygjbig-2.dll - os=4.0 img=0.0 sys=5.2
                  "cygjbig-2.dll" v0.0 ts=1970-01-01 00:00
   18k 2014/06/17 C:\cygwin64\bin\cygjbig85-2.dll - os=4.0 img=0.0 sys=5.2
                  "cygjbig85-2.dll" v0.0 ts=1970-01-01 00:00
  255k 2014/12/29 C:\cygwin64\bin\cygjpeg-8.dll - os=4.0 img=0.0 sys=5.2
                  "cygjpeg-8.dll" v0.0 ts=2014-12-29 21:07
  180k 2015/02/22 C:\cygwin64\bin\cygk5crypto-3.dll - os=4.0 img=0.0 sys=5.2
                  "cygk5crypto-3.dll" v0.0 ts=2015-02-22 10:05
  720k 2015/02/22 C:\cygwin64\bin\cygkrb5-3.dll - os=4.0 img=0.0 sys=5.2
                  "cygkrb5-3.dll" v0.0 ts=2015-02-22 10:05
   35k 2015/02/22 C:\cygwin64\bin\cygkrb5support-0.dll - os=4.0 img=0.0 sys=5.2
                  "cygkrb5support-0.dll" v0.0 ts=2015-02-22 10:04
   45k 2015/02/19 C:\cygwin64\bin\cyglber-2-4-2.dll - os=4.0 img=0.0 sys=5.2
                  "cyglber-2-4-2.dll" v0.0 ts=2015-02-19 14:39
  293k 2014/11/14 C:\cygwin64\bin\cyglcms2-2.dll - os=4.0 img=0.0 sys=5.2
                  "cyglcms2-2.dll" v0.0 ts=2014-11-14 12:24
  246k 2015/02/19 C:\cygwin64\bin\cygldap-2-4-2.dll - os=4.0 img=0.0 sys=5.2
                  "cygldap-2-4-2.dll" v0.0 ts=2015-02-19 14:40
  261k 2015/02/19 C:\cygwin64\bin\cygldap_r-2-4-2.dll - os=4.0 img=0.0 sys=5.2
                  "cygldap_r-2-4-2.dll" v0.0 ts=2015-02-19 14:41
17466k 2015/02/08 C:\cygwin64\bin\cygLLVM-3.4.dll - os=4.0 img=0.0 sys=5.2
                  "cygLLVM-3.4.dll" v0.0 ts=2015-02-08 17:48
    6k 2015/03/04 C:\cygwin64\bin\cyglsa64.dll - os=4.0 img=0.0 sys=5.2
                  "cyglsa64.dll" v0.0 ts=2015-03-04 11:09
   35k 2015/02/17 C:\cygwin64\bin\cygltdl-7.dll - os=4.0 img=0.0 sys=5.2
                  "cygltdl-7.dll" v0.0 ts=2015-02-17 18:26
  128k 2015/01/15 C:\cygwin64\bin\cyglzma-5.dll - os=4.0 img=0.0 sys=5.2
                  "cyglzma-5.dll" v0.0 ts=2015-01-15 20:11
  126k 2014/11/17 C:\cygwin64\bin\cyglzo2-2.dll - os=4.0 img=0.0 sys=5.2
                  "cyglzo2-2.dll" v0.0 ts=2014-11-17 11:24
  113k 2015/02/18 C:\cygwin64\bin\cygmagic-1.dll - os=4.0 img=0.0 sys=5.2
                  "cygmagic-1.dll" v0.0 ts=2015-02-18 10:55
  158k 2014/08/12 C:\cygwin64\bin\cygman-2-6-7.dll - os=4.0 img=0.0 sys=5.2
                  "cygman-2-6-7.dll" v0.0 ts=1970-01-01 00:00
   29k 2015/04/13 C:\cygwin64\bin\cygmenuw-10.dll - os=4.0 img=0.0 sys=5.2
                  "cygmenuw-10.dll" v0.0 ts=2015-04-13 07:50
  334k 2015/01/26 C:\cygwin64\bin\cygmpfr-4.dll - os=4.0 img=0.0 sys=5.2
                  "cygmpfr-4.dll" v0.0 ts=2015-01-26 16:14
   53k 2015/04/13 C:\cygwin64\bin\cygncurses++w-10.dll - os=4.0 img=0.0 sys=5.2
                  "cygncurses++w-10.dll" v0.0 ts=2015-04-13 07:56
  301k 2015/04/13 C:\cygwin64\bin\cygncursesw-10.dll - os=4.0 img=0.0 sys=5.2
                  "cygncursesw-10.dll" v0.0 ts=2015-04-13 07:48
  126k 2015/01/12 C:\cygwin64\bin\cygopenjpeg-1.dll - os=4.0 img=1.5 sys=5.2
                  "cygopenjpeg-1.dll" v0.0 ts=2015-01-12 02:51
   30k 2015/01/13 C:\cygwin64\bin\cygOpenVG-1.dll - os=4.0 img=0.0 sys=5.2
                  "cygOpenVG-1.dll" v0.0 ts=2015-01-13 09:53
  220k 2014/10/19 C:\cygwin64\bin\cygp11-kit-0.dll - os=4.0 img=0.0 sys=5.2
                  "cygp11-kit-0.dll" v0.0 ts=2014-10-19 14:36
   14k 2015/04/13 C:\cygwin64\bin\cygpanelw-10.dll - os=4.0 img=0.0 sys=5.2
                  "cygpanelw-10.dll" v0.0 ts=2015-04-13 07:49
  280k 2014/12/08 C:\cygwin64\bin\cygpcre-1.dll - os=4.0 img=0.0 sys=5.2
                  "cygpcre-1.dll" v0.0 ts=2014-12-08 23:50
 1581k 2015/02/17 C:\cygwin64\bin\cygperl5_14.dll - os=4.0 img=0.0 sys=5.2
                  "cygperl5_14.dll" v0.0 ts=2015-02-17 20:41
   39k 2015/04/09 C:\cygwin64\bin\cygpipeline-1.dll - os=4.0 img=0.0 sys=5.2
                  "cygpipeline-1.dll" v0.0 ts=2015-04-09 21:04
  654k 2014/11/16 C:\cygwin64\bin\cygpixman-1-0.dll - os=4.0 img=0.0 sys=5.2
                  "cygpixman-1-0.dll" v0.0 ts=2014-11-16 22:16
  179k 2015/04/13 C:\cygwin64\bin\cygpng16-16.dll - os=4.0 img=0.0 sys=5.2
                  "cygpng16-16.dll" v0.0 ts=2015-04-13 19:47
 2003k 2015/04/13 C:\cygwin64\bin\cygpoppler-46.dll - os=4.0 img=0.0 sys=5.2
                  "cygpoppler-46.dll" v0.0 ts=2015-04-13 18:12
   41k 2013/10/21 C:\cygwin64\bin\cygpopt-0.dll - os=4.0 img=0.0 sys=5.2
                  "cygpopt-0.dll" v0.0 ts=2013-10-21 21:52
  207k 2015/01/27 C:\cygwin64\bin\cygreadline7.dll - os=4.0 img=0.0 sys=5.2
                  "cygreadline7.dll" v0.0 ts=2015-01-27 03:51
   97k 2014/11/24 C:\cygwin64\bin\cygsasl2-3.dll - os=4.0 img=0.0 sys=5.2
                  "cygsasl2-3.dll" v0.0 ts=2014-11-24 18:22
   89k 2015/03/23 C:\cygwin64\bin\cygsmartcols-1.dll - os=4.0 img=0.0 sys=5.2
                  "cygsmartcols-1.dll" v0.0 ts=2015-03-23 09:46
  758k 2015/04/10 C:\cygwin64\bin\cygsqlite3-0.dll - os=4.0 img=0.0 sys=5.2
                  "cygsqlite3-0.dll" v0.0 ts=2015-04-10 09:33
  143k 2015/03/17 C:\cygwin64\bin\cygssh2-1.dll - os=4.0 img=0.0 sys=5.2
                  "cygssh2-1.dll" v0.0 ts=2015-03-17 04:00
  419k 2015/03/19 C:\cygwin64\bin\cygssl-1.0.0.dll - os=4.0 img=0.0 sys=5.2
                  "cygssl-1.0.0.dll" v0.0 ts=2015-03-19 16:49
   12k 2015/03/02 C:\cygwin64\bin\cygssp-0.dll - os=4.0 img=0.0 sys=5.2
                  "cygssp-0.dll" v0.0 ts=2015-03-02 21:33
  941k 2015/03/02 C:\cygwin64\bin\cygstdc++-6.dll - os=4.0 img=0.0 sys=5.2
                  "cygstdc++-6.dll" v0.0 ts=2015-03-02 20:57
   64k 2014/11/13 C:\cygwin64\bin\cygtasn1-6.dll - os=4.0 img=0.0 sys=5.2
                  "cygtasn1-6.dll" v0.0 ts=2014-11-13 18:20
   52k 2015/04/13 C:\cygwin64\bin\cygticw-10.dll - os=4.0 img=0.0 sys=5.2
                  "cygticw-10.dll" v0.0 ts=2015-04-13 07:48
  415k 2014/05/30 C:\cygwin64\bin\cygtiff-6.dll - os=4.0 img=0.0 sys=5.2
                  "cygtiff-6.dll" v0.0 ts=1970-01-01 00:00
   12k 2014/05/30 C:\cygwin64\bin\cygtiffxx-6.dll - os=4.0 img=0.0 sys=5.2
                  "cygtiffxx-6.dll" v0.0 ts=1970-01-01 00:00
   15k 2015/03/23 C:\cygwin64\bin\cyguuid-1.dll - os=4.0 img=0.0 sys=5.2
                  "cyguuid-1.dll" v0.0 ts=2015-03-23 09:46
   30k 2013/11/15 C:\cygwin64\bin\cygwrap-0.dll - os=4.0 img=0.0 sys=5.2
                  "cygwrap-0.dll" v0.0 ts=2013-11-15 19:58
 1134k 2015/03/26 C:\cygwin64\bin\cygX11-6.dll - os=4.0 img=0.0 sys=5.2
                  "cygX11-6.dll" v0.0 ts=2015-03-26 15:14
    9k 2015/03/26 C:\cygwin64\bin\cygX11-xcb-1.dll - os=4.0 img=0.0 sys=5.2
                  "cygX11-xcb-1.dll" v0.0 ts=2015-03-26 15:14
   12k 2013/06/06 C:\cygwin64\bin\cygXau-6.dll - os=4.0 img=0.0 sys=5.2
                  "cygXau-6.dll" v0.0 ts=2013-06-06 06:23
  102k 2014/05/20 C:\cygwin64\bin\cygxcb-1.dll - os=4.0 img=0.0 sys=5.2
                  "cygxcb-1.dll" v0.0 ts=1970-01-01 00:00
   71k 2014/05/20 C:\cygwin64\bin\cygxcb-glx-0.dll - os=4.0 img=0.0 sys=5.2
                  "cygxcb-glx-0.dll" v0.0 ts=1970-01-01 00:00
   32k 2014/05/20 C:\cygwin64\bin\cygxcb-render-0.dll - os=4.0 img=0.0 sys=5.2
                  "cygxcb-render-0.dll" v0.0 ts=1970-01-01 00:00
   13k 2014/05/20 C:\cygwin64\bin\cygxcb-shm-0.dll - os=4.0 img=0.0 sys=5.2
                  "cygxcb-shm-0.dll" v0.0 ts=1970-01-01 00:00
   21k 2015/03/26 C:\cygwin64\bin\cygXdmcp-6.dll - os=4.0 img=0.0 sys=5.2
                  "cygXdmcp-6.dll" v0.0 ts=2015-03-26 15:38
   56k 2014/08/10 C:\cygwin64\bin\cygXext-6.dll - os=4.0 img=0.0 sys=5.2
                  "cygXext-6.dll" v0.0 ts=1970-01-01 00:00
 1207k 2014/10/19 C:\cygwin64\bin\cygxml2-2.dll - os=4.0 img=0.0 sys=5.2
                  "cygxml2-2.dll" v0.0 ts=2014-10-19 08:52
   35k 2013/06/14 C:\cygwin64\bin\cygXrender-1.dll - os=4.0 img=0.0 sys=5.2
                  "cygXrender-1.dll" v0.0 ts=2013-06-14 09:29
   80k 2014/11/19 C:\cygwin64\bin\cygz.dll - os=4.0 img=0.0 sys=5.2
                  "cygz.dll" v0.0 ts=2014-11-19 23:08
 3189k 2015/03/04 C:\cygwin64\bin\cygwin1.dll - os=4.0 img=0.0 sys=5.2
                  "cygwin1.dll" v0.0 ts=1970-01-01 00:00
    Cygwin DLL version info:
        DLL version: 1.7.35
        DLL epoch: 19
        DLL old termios: 5
        DLL malloc env: 28
        Cygwin conv: 181
        API major: 0
        API minor: 287
        Shared data: 5
        DLL identifier: cygwin1
        Mount registry: 3
        Cygwin registry name: Cygwin
        Installations name: Installations
        Cygdrive default prefix: 
        Build date: 
        Shared id: cygwin1S5


Can't find the cygrunsrv utility, skipping services check.


Cygwin Package Information
Last downloaded files to: C:\Users\johnru\Desktop\DHR\data.19l
Last downloaded files from: http://www.gtlib.gatech.edu/pub/cygwin/

Package                   Version            Status
_autorebase               001002-1           OK
_update-info-dir          00419-1            OK
alternatives              1.3.30c-10         OK
base-cygwin               3.8-1              OK
base-files                4.2-3              OK
bash                      4.3.33-1           OK
binutils                  2.25-1             OK
bzip2                     1.0.6-2            OK
ca-certificates           2.3-1              OK
coreutils                 8.23-4             OK
csih                      0.9.8-6            OK
cygutils                  1.4.14-1           OK
cygwin                    1.7.35-1           OK
dash                      0.5.8-3            OK
diffutils                 3.3-2              OK
dri-drivers               10.3.7-1           OK
editrights                1.03-1             OK
file                      5.22-1             OK
findutils                 4.5.12-1           OK
gamin                     0.1.10-15          OK
gawk                      4.1.1-1            OK
getent                    2.18.90-4          OK
grep                      2.21-2             OK
groff                     1.22.3-1           OK
gsettings-desktop-schemas 3.14.1-1           OK
gzip                      1.6-1              OK
hostname                  3.13-1             OK
inetutils                 1.9.1-2            OK
inetutils-server          1.9.1-2            OK
info                      5.2-3              OK
ipc-utils                 1.0-2              OK
less                      458-2              OK
libargp                   20110921-2         OK
libattr1                  2.4.46-1           OK
libblkid1                 2.25.2-2           OK
libbz2_1                  1.0.6-2            OK
libcairo2                 1.12.18-2          OK
libcatgets1               1.1-2              OK
libcom_err2               1.42.12-2          OK
libcrypt0                 1.1-1              OK
libcurl4                  7.41.0-1           OK
libdb5.3                  5.3.21-1           OK
libEGL1                   10.3.7-1           OK
libexpat1                 2.1.0-3            OK
libfam0                   0.1.10-15          OK
libffi6                   3.2.1-1            OK
libfontconfig1            2.11.1-2           OK
libfreetype6              2.5.5-1            OK
libgcc1                   4.9.2-3            OK
libgdbm4                  1.11-1             OK
libGL1                    10.3.7-1           OK
libglapi0                 10.3.7-1           OK
libglib2.0_0              2.42.2-1           OK
libgmp10                  6.0.0a-2           OK
libgssapi_krb5_2          1.13.1-1           OK
libguile17                1.8.8-1            OK
libiconv                  1.14-3             OK
libiconv2                 1.14-3             OK
libidn11                  1.29-1             OK
libintl8                  0.19.4-1           OK
libjbig2                  2.0-14             OK
libjpeg8                  1.3.1-3            OK
libk5crypto3              1.13.1-1           OK
libkrb5_3                 1.13.1-1           OK
libkrb5support0           1.13.1-1           OK
liblcms2_2                2.6-1              OK
libllvm3.4                3.4.2-5            OK
libltdl7                  2.4.6-1            OK
liblzma5                  5.0.8-1            OK
liblzo2_2                 2.08-1             OK
libmpfr4                  3.1.2-2            OK
libncursesw10             5.9-20150404-1     OK
libopenjpeg1              1.5.2-2            OK
libopenldap2_4_2          2.4.40-2           OK
libopenssl100             1.0.2a-1           OK
libOpenVG1                10.3.7-1           OK
libp11-kit0               0.20.7-1           OK
libpcre1                  8.36-1             OK
libpipeline1              1.4.0-1            OK
libpixman1_0              0.32.6-1           OK
Empty package libpng-doc
libpng-doc                1.6.17-1           OK
libpng16                  1.6.17-1           OK
libpoppler46              0.26.5-3           OK
Empty package libpopt0
libpopt0                  1.16-1             OK
libreadline7              6.3.8-1            OK
libsasl2_3                2.1.26-9           OK
libsmartcols1             2.25.2-2           OK
libsqlite3_0              3.8.9-1            OK
libssh2_1                 1.5.0-1            OK
libssp0                   4.9.2-3            OK
libstdc++6                4.9.2-3            OK
libtasn1_6                4.2-1              OK
libtiff6                  4.0.3-2            OK
libuuid-devel             2.25.2-2           OK
libuuid1                  2.25.2-2           OK
libwrap0                  7.6-22             OK
libX11-xcb1               1.6.3-1            OK
libX11_6                  1.6.3-1            OK
libXau6                   1.0.8-1            OK
libxcb-glx0               1.10-1             OK
libxcb-render0            1.10-1             OK
libxcb-shm0               1.10-1             OK
libxcb1                   1.10-1             OK
libXdmcp6                 1.1.2-1            OK
libXext6                  1.3.3-1            OK
libxml2                   2.9.2-1            OK
libXrender1               0.9.8-1            OK
login                     1.11-1             OK
lynx                      2.8.7-2            OK
make                      4.1-1              OK
man-db                    2.6.7-2            OK
mintty                    1.2-beta1-1        OK
nc                        1.107-4            OK
openssl                   1.0.2a-1           OK
p11-kit                   0.20.7-1           OK
p11-kit-trust             0.20.7-1           OK
perl                      5.14.4-3           OK
perl_autorebase           5.14.4-3           OK
perl_base                 5.14.4-3           OK
poppler                   0.26.5-3           OK
poppler-data              0.4.6-1            OK
popt                      1.16-1             OK
pylint                    1.3.1-1            OK
python                    2.7.8-1            OK
python-logilab-astng      0.24.3-1           OK
python-logilab-common     0.62.0-1           OK
rebase                    4.4.1-1            OK
run                       1.3.3-1            OK
sed                       4.2.2-3            OK
shared-mime-info          1.3-3              OK
tar                       1.27.1-1           OK
tcsh                      6.18.01-6          OK
terminfo                  5.9-20150404-1     OK
tzcode                    2014j-1            OK
util-linux                2.25.2-2           OK
vim                       7.4.692-1          OK
vim-common                7.4.692-1          OK
vim-minimal               7.4.692-1          OK
which                     2.20-2             OK
xxd                       7.4.692-1          OK
xz                        5.0.8-1            OK
zlib0                     1.2.8-3            OK
Use -h to see help about each section

[-- Attachment #3: id.out --]
[-- Type: application/octet-stream, Size: 2286 bytes --]

uid=1158474(johnru) gid=1049089(Domain Users) groups=1049089(Domain Users),544(Administrators),545(Users),4(INTERACTIVE),66049(CONSOLE LOGON),11(Authenticated Users),15(This Organization),4095(CurrentSession),66048(LOCAL),1058289(Corporate Employees),1070479(MRM Test),1070036(MFGREF_4400_4500 RW),1068060(Xfer_Clinical Publications RO),1095259(RD-Field_Uploads),1050783(Remote Users),1063659(VersionCtrlTeam MFG),1058389(SAP-Users),1050178(MechanicalEng),1063402(SHP-XSIEMPLOYEES-INFOWEB-ACCESS),1072570(ppm_users),1159809(DTE_LEVEL_DEVELOPER),1049749(Sposables),1066046(International Training RO),1163978(Q215.Mfg.ServReg.D2),1049995(Manufacturing),1161353(RDS-MBAM-Selfhelp),1065101(Newpub_engineering RW),1091141(mfg_ref-Admin),1069010(MX-MFG-RO),1065052(Instrument PQA RW),1058040(Engineering Group),1065361(Procust_SolidWorks_XSITemplates RO),1053611(Test Engineering),1062808(Marketing_Product_Marketing_G2.0),1159216(RO-pub),1062690(ME Project Signup),1158728(RemoteFeUsers),1169261(Citrix_XA_InternalUsers),1053642(Software Engineering),1064958(Endoluminal Group),1058649(Test Group),1154075(RDS-DallasDB),1053639(Mechanical Eng),1147516(APP-V-Clients),1084721(Internal Users),1147103(MKS_Users),1155174(XSGK(RO)),1083835(NPI_Svcs-RO),1159724(CH-Design-Studio),1064806(Research_WO),1148634(RDS-Infoweb),1054814(TRACKIT),1064755(Engineering_Projects RW),1066067(International Policies RO),1091142(mfg_ref-Modify),1161509(RW-sales_pub),1071673(SSL_RAS),1073787(isi-goleta1-Spch-ful),1064795(950 Sunnyvale),1146328(Mimic_Drylab_Exercises_RW),1160663(Stash_Users),1053658(Mountain View Employ),1052635(ManufacturingEng),1164816(SAPGUI-User),1071377(ADP Training RO),1155273(RDS-SAPLogonPad),1083394(RDS_Access),1071675(SSL_Engineers),1083071(GPO-ExchCachedMode),1073887(Xray Operations),1151201(XSGK QMS RO),1145691(OrionInstruments-RO),1069011(MX-MFG-RW),1160660(Jira_Full_Users),1169257(Citrix_XA_ISMES),1073583(Agile_Users),1050174(daVinci Development),1064790(Patent Status RO),1078944(xfer_marketing rw),1170820(PM 2015 Employees),1053673(XSI Employees - US),1052636(Engineering),1160661(Confluence_Users),1160561(Matlab-Sec),1067284(NEWPUB Share),1169336(Citrix_XA_SAP_GUI),1160904(CIP-WIN-Non-Sales),1068450(1266 Kifer Bldg.102),1053634(Xray E),405504(High Mandatory Level)

[-- Attachment #4: Type: text/plain, Size: 218 bytes --]

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: cacls combination problem in 1.7.35, merging privs of existing file & privs of process
  2015-06-20 18:42 cacls combination problem in 1.7.35, merging privs of existing file & privs of process John Ruckstuhl
@ 2015-06-22 21:15 ` John Ruckstuhl
  2015-06-23 10:09   ` Corinna Vinschen
  0 siblings, 1 reply; 4+ messages in thread
From: John Ruckstuhl @ 2015-06-22 21:15 UTC (permalink / raw)
  To: cygwin

On Sat, Jun 20, 2015 at 11:41 AM, John Ruckstuhl
<John.Ruckstuhl@intusurg.com> wrote:
>
> I'm noticing this summer, that whenever I try to edit an existing file with vi for the first time, the file's permissions change.  Could this be a problem with merging permissions of existing file and permissions of the vi process?

To clarify, for me, when the vi process is writing out a fresh file,
the new file gets an acl ...  Then when vi overwrites that file
(presumably creating a new file with an acl per the merging of the
existing acl and new-file acl, the result is different acl.  The file
when first written -- execution via the shebang works.  When updated,
something -- the file or the shebang -- doesn't execute anymore.

I believe this is easily reproducible (1.7.35).  My umask is 0022.

1.  In vi, create 2 lines of content including a shebang, like this:
        !# /usr/bin/sh
        date
2.  write it out to a file, like try.sh
3.  execute it
        ./try.sh
    it works, right?
4.  write the file back out a 2nd time (no changes)
5.  execute it again
        ./try.sh
    but this time, it doesn't work
        -bash: ./try.sh: Permission denied
6.  now delete the shebang line, and write the file out (3rd time)
7.  execute it again
        ./try.sh
    it works again.  Huh?

So yes I am still puzzled about the acl diff between the 1st & 2nd
file-write, and also it looks like it's a shebang interaction.

FWIW, I think my user sid & group sid are different. See Footnote [3] below.

Best regards,
John

Footnotes
[3]
I claim user sid & group sid are different because id says:
    uid=1158474(johnru) gid=1049089(Domain Users)
groups=1049089(Domain
Users),544(Administrators),545(Users),4(INTERACTIVE),66049(CONSOLE
LOGON),11(Authenticated Users),15(This
Organization),4095(CurrentSession),66048(LOCAL),1058289(Corporate
Employees), ...

and the RIDs are different (109898 != 513) (btw, is this the accepted
technique to get SID?):

    C:\Users\johnru>wmic useraccount where name='JohnRu' get sid
    SID
    S-1-5-21-25853599-488532567-929701000-109898

    C:\Users\johnru>wmic group where name='Domain Users' get sid
    SID
    S-1-5-21-25853599-488532567-929701000-513

>
> Original cacls of file try2.txt:
>     try2.txt INTSURG\johnru:(R,W,D,WDAC,WO)
>              INTSURG\Domain Users:(R)
>              Everyone:(R)
>              NT AUTHORITY\SYSTEM:(F)
>              BUILTIN\Administrators:(F)
> Cacls after vi open & write back out (":wq")
>     try2.txt INTSURG\johnru:(DENY)(S,X)
>              INTSURG\johnru:(R,W,D,WDAC,WO)
>              INTSURG\Domain Users:(RX,W)
>              Everyone:(R)
>              NT AUTHORITY\SYSTEM:(RX,W)
>              BUILTIN\Administrators:(RX,W)
> Note 1 added deny line, and 3 lines changed from (R) or (F), to (RX,W).
>
> Or see differing getfacl output... try1.txt is a fresh file, try2.txt is a file re-written by vi session:
>     johnru@JohnRu-L1 ~/Desktop/dev NSIS/foul
>     $ getfacl . try*
>     # file: .
>     # owner: johnru
>     # group: Domain Users
>     user::rwx
>     group::r-x
>     group:SYSTEM:rwx
>     group:Administrators:rwx
>     mask:rwx
>     other:r-x
>     default:user::rwx
>     default:group::r-x
>     default:group:SYSTEM:rwx
>     default:group:Administrators:rwx
>     default:mask:rwx
>     default:other:r-x
>
>     # file: try1.txt
>     # owner: johnru
>     # group: Domain Users
>     user::rw-
>     group::r--
>     group:SYSTEM:rwx
>     group:Administrators:rwx
>     mask:rwx
>     other:r--
>
>     # file: try2.txt
>     # owner: johnru
>     # group: Domain Users
>     user::rw-
>     group::rwx
>     group:SYSTEM:rwx
>     group:Administrators:rwx
>     mask:rwx
>     other:r--
>
>
> From the same shell, writing out a file by two techniques yields different cacls.
> Please help me understand the phenomenon.
> I am suspecting vi (or a library it calls) which tries to combine existing privileges of a file with the privs of the vi process, to generate privileges of the new file created on ":w".
> I am not asking for this behavior to be changed, and yes I'm expecting the behavior is different with Cygwin 2.0 .
> I am just trying to understand what is happening here, and which sw app or library is defining this behavior.  Is it vi?  Is it the cygwin1.dll?
> Sorry, I am using the terms privilege, permission, and cacl interchangeably out of ignorance.
> Also, I have tried to read https://cygwin.com/cygwin-ug-net/ntsec.html .  Sorry, I don't see that it documents this phenomenon.  I looked in mailing-list archives, and I couldn't connect the dots.  Again this is 1.7.35 .
> cygcheck.out is attached.
> id.out is attached.
>
> Use case:
> I create a file by redirecting stdout to a file.
> Then I open in vi and write it back out (":wq") and its cacls have changed.  Notably, as you can see, I no longer have "execute" permission.
> Is this a feature of vi, of bash, or of cygwin?
>
> It seems like bash & vi are using different techniques for determining how to specify the cacls of a new file (vi creating a new file on write).
> I know that over the past six months, cygwin handling of acls has been a topic of discussion.
> Also note,
> (a) this is on my C drive, under my Desktop, not on some remote fileserver.
> (b) Windows 7.
> (c) my IT dept routinely gives power-users Window Administrator privileges, so I have that, even though I'm not sure I want that attached to my day-to-day account.
> (d) while I am making these observations, I am at home, not on my domain network.
>
> Below, my control case is try1.txt, and my experiment is try2.txt (see Footnote [1]).
>
> Hmmm what if I write a new file with vi (instead of rewriting a file).
> Ahhh, In the new file case, vi writes file with same cacls as a fresh file written by shell redirect.
> Maybe what I'm observing is vi is trying to respect the original cacls when creating the updated file.
> So it's a problem with vi's attempt to combine the files original cacls with vi's notion of the privileges of its own process... (see Footnote [2])
>
> Footnotes
> [1]
> johnru@JohnRu-L1 ~/Desktop/dev NSIS/foul
> $ icacls .
> . INTSURG\johnru:(F)
>   INTSURG\Domain Users:(RX)
>   Everyone:(RX)
>   NT AUTHORITY\SYSTEM:(OI)(CI)(F)
>   BUILTIN\Administrators:(OI)(CI)(F)
>   CREATOR OWNER:(OI)(CI)(IO)(F)
>   CREATOR GROUP:(OI)(CI)(IO)(RX)
>   Everyone:(OI)(CI)(IO)(RX)
>
> Successfully processed 1 files; Failed processing 0 files
>
> johnru@JohnRu-L1 ~/Desktop/dev NSIS/foul
> $ date > try1.txt
>
> johnru@JohnRu-L1 ~/Desktop/dev NSIS/foul
> $ date > try2.txt
>
> johnru@JohnRu-L1 ~/Desktop/dev NSIS/foul
> $ icacls try1.txt; icacls try2.txt
> try1.txt INTSURG\johnru:(R,W,D,WDAC,WO)
>          INTSURG\Domain Users:(R)
>          Everyone:(R)
>          NT AUTHORITY\SYSTEM:(F)
>          BUILTIN\Administrators:(F)
>
> Successfully processed 1 files; Failed processing 0 files
> try2.txt INTSURG\johnru:(R,W,D,WDAC,WO)
>          INTSURG\Domain Users:(R)
>          Everyone:(R)
>          NT AUTHORITY\SYSTEM:(F)
>          BUILTIN\Administrators:(F)
>
> Successfully processed 1 files; Failed processing 0 files
>
> (now edit file "try2.txt", and write it back out ":wq")
> johnru@JohnRu-L1 ~/Desktop/dev NSIS/foul
> $ vi try2.txt
>
> (cacls have been changed! )
> johnru@JohnRu-L1 ~/Desktop/dev NSIS/foul
> $ icacls try1.txt; icacls try2.txt
> try1.txt INTSURG\johnru:(R,W,D,WDAC,WO)
>          INTSURG\Domain Users:(R)
>          Everyone:(R)
>          NT AUTHORITY\SYSTEM:(F)
>          BUILTIN\Administrators:(F)
>
> Successfully processed 1 files; Failed processing 0 files
> try2.txt INTSURG\johnru:(DENY)(S,X)
>          INTSURG\johnru:(R,W,D,WDAC,WO)
>          INTSURG\Domain Users:(RX,W)
>          Everyone:(R)
>          NT AUTHORITY\SYSTEM:(RX,W)
>          BUILTIN\Administrators:(RX,W)
>
> Successfully processed 1 files; Failed processing 0 files
>
> johnru@JohnRu-L1 ~/Desktop/dev NSIS/foul
> $ ls -la
> total 6
> drwxrwxr-x+ 1 johnru         Domain Users  0 Jun 20 09:34 .
> drwxrwx---+ 1 Administrators Domain Users  0 Jun 20 09:32 ..
> -rw-rwxr--+ 1 johnru         Domain Users 30 Jun 20 09:33 try1.txt
> -rw-rwxr--+ 1 johnru         Domain Users 30 Jun 20 09:34 try2.txt
>
>
> [2] file "try3.txt" doesn't exist yet.  Using vi to create it with the following command
> johnru@JohnRu-L1 ~/Desktop/dev NSIS/foul
> $ vi try3.txt
>
> johnru@JohnRu-L1 ~/Desktop/dev NSIS/foul
> $ icacls try3.txt
> try3.txt INTSURG\johnru:(R,W,D,WDAC,WO)
>          INTSURG\Domain Users:(R)
>          Everyone:(R)
>          NT AUTHORITY\SYSTEM:(F)
>          BUILTIN\Administrators:(F)
>
> Successfully processed 1 files; Failed processing 0 files
>
> johnru@JohnRu-L1 ~/Desktop/dev NSIS/foul
> $ icacls try3.txt
> try3.txt INTSURG\johnru:(R,W,D,WDAC,WO)
>          INTSURG\Domain Users:(R)
>          Everyone:(R)
>          NT AUTHORITY\SYSTEM:(F)
>          BUILTIN\Administrators:(F)
>
> Successfully processed 1 files; Failed processing 0 files
>
> johnru@JohnRu-L1 ~/Desktop/dev NSIS/foul
> $ vi try3.txt
>
> johnru@JohnRu-L1 ~/Desktop/dev NSIS/foul
> $ icacls try3.txt
> try3.txt INTSURG\johnru:(DENY)(S,X)
>          INTSURG\johnru:(R,W,D,WDAC,WO)
>          INTSURG\Domain Users:(RX,W)
>          Everyone:(R)
>          NT AUTHORITY\SYSTEM:(RX,W)
>          BUILTIN\Administrators:(RX,W)
>
> Successfully processed 1 files; Failed processing 0 files
>
>
>
>
> --
> 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

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: cacls combination problem in 1.7.35, merging privs of existing file & privs of process
  2015-06-22 21:15 ` John Ruckstuhl
@ 2015-06-23 10:09   ` Corinna Vinschen
  2015-06-23 13:49     ` Corinna Vinschen
  0 siblings, 1 reply; 4+ messages in thread
From: Corinna Vinschen @ 2015-06-23 10:09 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 3894 bytes --]

Hi John,

On Jun 22 14:15, John Ruckstuhl wrote:
> On Sat, Jun 20, 2015 at 11:41 AM, John Ruckstuhl
> <John.Ruckstuhl@intusurg.com> wrote:
> >
> > I'm noticing this summer, that whenever I try to edit an existing file with vi for the first time, the file's permissions change.  Could this be a problem with merging permissions of existing file and permissions of the vi process?
> 
> To clarify, for me, when the vi process is writing out a fresh file,
> the new file gets an acl ...

Yes, it's a combination of the POSIX permissions and the inherited
ACEs from the parent directory.

> Then when vi overwrites that file
> (presumably creating a new file with an acl per the merging of the
> existing acl and new-file acl, the result is different acl.  The file
> when first written -- execution via the shebang works.  When updated,
> something -- the file or the shebang -- doesn't execute anymore.
> 
> I believe this is easily reproducible (1.7.35).  My umask is 0022.
> 
> 1.  In vi, create 2 lines of content including a shebang, like this:
>         !# /usr/bin/sh
>         date
> 2.  write it out to a file, like try.sh
> 3.  execute it
>         ./try.sh
>     it works, right?

Not for me.

> 4.  write the file back out a 2nd time (no changes)
> 5.  execute it again
>         ./try.sh
>     but this time, it doesn't work
>         -bash: ./try.sh: Permission denied
> 6.  now delete the shebang line, and write the file out (3rd time)
> 7.  execute it again
>         ./try.sh
>     it works again.  Huh?
> 
Nope, not here.

> So yes I am still puzzled about the acl diff between the 1st & 2nd
> file-write, and also it looks like it's a shebang interaction.
> 
> FWIW, I think my user sid & group sid are different. See Footnote [3] below.
> 
> Best regards,
> John
> 
> Footnotes
> [3]
> I claim user sid & group sid are different because id says:
>     uid=1158474(johnru) gid=1049089(Domain Users)
> groups=1049089(Domain
> Users),544(Administrators),545(Users),4(INTERACTIVE),66049(CONSOLE
> LOGON),11(Authenticated Users),15(This
> Organization),4095(CurrentSession),66048(LOCAL),1058289(Corporate
> Employees), ...
> 
> and the RIDs are different (109898 != 513) (btw, is this the accepted
> technique to get SID?):
> 
>     C:\Users\johnru>wmic useraccount where name='JohnRu' get sid
>     SID
>     S-1-5-21-25853599-488532567-929701000-109898

You can do this with Cygwin tools:

  $ getent -w passwd JohnRu
  JohnRu:1158474:INTSURG\JohnRu:S-1-5-21-25853599-488532567-929701000-109898

  The format is:

  Cygwin username:UID:Windows domain&username:SID

And of course your user account is different from your primary group.
They can only ever be identical on non-domain mamber machines when using
the "Microsoft Accounts", where you login with your email address.

>     C:\Users\johnru>wmic group where name='Domain Users' get sid
>     SID
>     S-1-5-21-25853599-488532567-929701000-513
> 
> >
> > Original cacls of file try2.txt:
> >     try2.txt INTSURG\johnru:(R,W,D,WDAC,WO)
> >              INTSURG\Domain Users:(R)
> >              Everyone:(R)
> >              NT AUTHORITY\SYSTEM:(F)
> >              BUILTIN\Administrators:(F)
> > Cacls after vi open & write back out (":wq")
> >     try2.txt INTSURG\johnru:(DENY)(S,X)
> >              INTSURG\johnru:(R,W,D,WDAC,WO)
> >              INTSURG\Domain Users:(RX,W)
> >              Everyone:(R)
> >              NT AUTHORITY\SYSTEM:(RX,W)
> >              BUILTIN\Administrators:(RX,W)

After I set up a directory with your permissions, I can reproduce this.
I have an idea what the problem is, but I have to debug this further.
Stay tuned.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: cacls combination problem in 1.7.35, merging privs of existing file & privs of process
  2015-06-23 10:09   ` Corinna Vinschen
@ 2015-06-23 13:49     ` Corinna Vinschen
  0 siblings, 0 replies; 4+ messages in thread
From: Corinna Vinschen @ 2015-06-23 13:49 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 3545 bytes --]

On Jun 23 12:09, Corinna Vinschen wrote:
> Hi John,
> [...]
> And of course your user account is different from your primary group.
> They can only ever be identical on non-domain mamber machines when using
> the "Microsoft Accounts", where you login with your email address.
> 
> >     C:\Users\johnru>wmic group where name='Domain Users' get sid
> >     SID
> >     S-1-5-21-25853599-488532567-929701000-513
> > 
> > >
> > > Original cacls of file try2.txt:
> > >     try2.txt INTSURG\johnru:(R,W,D,WDAC,WO)
> > >              INTSURG\Domain Users:(R)
> > >              Everyone:(R)
> > >              NT AUTHORITY\SYSTEM:(F)
> > >              BUILTIN\Administrators:(F)
> > > Cacls after vi open & write back out (":wq")
> > >     try2.txt INTSURG\johnru:(DENY)(S,X)
> > >              INTSURG\johnru:(R,W,D,WDAC,WO)
> > >              INTSURG\Domain Users:(RX,W)
> > >              Everyone:(R)
> > >              NT AUTHORITY\SYSTEM:(RX,W)
> > >              BUILTIN\Administrators:(RX,W)
> 
> After I set up a directory with your permissions, I can reproduce this.
> I have an idea what the problem is, but I have to debug this further.
> Stay tuned.

No, it's not what I thought.  This is a problem with the default
settings of vi.  It's not a problem when using vim with default
settings.  Try the same with vim instead of vi.  /usr/bin/vi is a
"small" version of vim, while /usr/bin/vim is a "huge" version.  They
are build with different build time options, just as on Fedora Linux, so
they behave slightly different.

However, there appears to be a bug in vim.

At "wq!", huge vim saves the file like this:

- open edited file
- write file content
- set UNIX perms via chmod(2).  This results in the "broken" permissions
  with the additional user deny ACE and rwx perms for the group.  This is
  expected, nothing to worry about.  Yet.
- set the ACL via acl(2).  This reverts the permissions to the original
  permissions.  All is well.

Small vi saves like this:

- open backup file (same as edited file, plus trailing '~')
- copy edited file content to backup file
- set UNIX perms on backup file via chmod(2)
- set ACL via acl(2) on backup file.  Now the backup file has the
  original perms of the edited file.
- open edited file
- write file content
- set UNIX perms via chmod(2).  Now perms are "broken" as above.
- And now, because a certain flag in vi is set ("backupcopy" is set
  to "yes"), vi *skips* writing the ACL to the original file, see
  fileio.c, line 4702ff:

    #ifdef HAVE_ACL
	/* Probably need to set the ACL before changing the user (can't set the
	 * ACL on a file the user doesn't own). */
	if (!backup_copy)
	    mch_set_acl(wfname, acl);
    #endif

So it turns out that this flag, "backupcopy", when set to "yes" as is
the default when running vi, breaks ACLs in certain cases.  In vim the
flag is set to "auto", which apparently translates to "no", usually.

I think this is a bug in vim.  The `if (!backup_copy)' is wrong.  It
should always try to write the ACL on systems supporting them.

But for the time being, there are at least three easy workarounds:

- Create a ~/.virc file with this line:

   set backupcopy=no

- Always run "vim", rather than "vi".

- Add an alias so that when you run vi, you actually start vim:

   alias vi=vim


HTH,
Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-06-23 13:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-20 18:42 cacls combination problem in 1.7.35, merging privs of existing file & privs of process John Ruckstuhl
2015-06-22 21:15 ` John Ruckstuhl
2015-06-23 10:09   ` Corinna Vinschen
2015-06-23 13:49     ` Corinna Vinschen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).