My Cygwin installation has installation files owned by Unknown+User Unknown+Group, including the config dir

1

I installed Cygwin a couple of weeks ago, but this morning when I needed to grep some PC files I opened the cygwin terminal and it reported that my config dir is unreadable. It's owned by Unknown+User and Unknown+Group.

-bash: cd: /cygdrive/c/WINDOWS/system32/config/systemprofile: Permission denied WARNING: Failed attempt to cd into /cygdrive/c/WINDOWS/system32/config/systemprofile!

 /cygdrive/c/WINDOWS/system32
$ ls -l|grep Unknown
drwxr-x---  1 Unknown+User                Unknown+Group                       0 Feb 19 09:26 config
drwxr-x---  1 Unknown+User                Unknown+Group                       0 Sep 15 03:33 Configuration
drwxr-x---  1 Unknown+User                Unknown+Group                       0 Sep 15 03:33 DriverState
drwxr-x---  1 Unknown+User                Unknown+Group                       0 Sep 15 03:33 FxsTmp
drwxr-x---  1 Unknown+User                Unknown+Group                       0 Sep 15 03:34 ias
drwxr-x---  1 Unknown+User                Unknown+Group                       0 Sep 15 03:34 MsDtc
drwxr-x---  1 Unknown+User                Unknown+Group                       0 Sep 15 03:33 networklist
-rwxr-x---+ 1 Administrators              Unknown+Group                  137570 Feb 19 09:23 perfc009.dat
-rwxr-x---+ 1 Administrators              Unknown+Group                   33424 Sep 15 03:31 perfd009.dat
-rwxr-x---+ 1 Administrators              Unknown+Group                  716204 Feb 19 09:23 perfh009.dat
-rwxr-x---+ 1 Administrators              Unknown+Group                  297062 Sep 15 03:31 perfi009.dat
drwxr-x---  1 Unknown+User                Unknown+Group                       0 Feb 19 10:18 SleepStudy
drwxr-x---  1 Unknown+User                Unknown+Group                       0 Feb 19 11:21 sru
drwxr-x---  1 Unknown+User                Unknown+Group                       0 Feb 19 09:37 WDI

(As an aside, because it could be relevant, this PC just went through the upgrade to the rather horrible Windows 10 Update 1809 and a follow-up update. This caused a couple of problems, like bad audio and wifi drivers.)

What do I need to do to fix this?

Edit: I don't think the PC is part of a domain, but I don't know. id: uid=197611(sinc) gid=197121(None) groups=197121(None),545(Users),4(INTERACTIVE),66049(CONSOLE LOGON),11(Authenticated Users),15(This Organization),113(Local account),4095(CurrentSession),66048(LOCAL),262154(NTLM Authentication),401408(Medium Mandatory Level)

Sinc

Posted 2019-02-19T17:10:08.930

Reputation: 113

Is the PC part of a domain ? What is the output of id ? – matzeri – 2019-02-20T11:15:35.613

@matzeri edited with the info you want. – Sinc – 2019-02-20T13:48:55.203

Answers

2

You can not fix as it is a Windows issue not a cygwin issue. The owner of those files is readable only from a Administrator account.

The same problem is available from Power Shell, the error reports a lack of authorisation

Windows PowerShell
Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten.

PS C:\windows\system32> get-acl config
get-acl : Es wurde versucht, einen nicht autorisierten Vorgang auszuführen.
In Zeile:1 Zeichen:1
+ get-acl config

But if PowerShell is RunAs Administrator

Windows PowerShell
Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten.

PS C:\WINDOWS\system32> get-acl config

    Verzeichnis: C:\WINDOWS\system32

Path   Owner               Access
----   -----               ------
config NT-AUTORITÄT\SYSTEM ERSTELLER-BESITZER Allow  FullControl...

And from Cygwin Shell RunAs Administrator

 /cygdrive/c/windows/system32
$ ls -ld config
drwxrwx---+ 1 SYSTEM SYSTEM 0 Feb 16 07:38 config

matzeri

Posted 2019-02-19T17:10:08.930

Reputation: 1 662

Great! When I run cygwin as administrator everything works fine. Does that mean that I should always do that, or should I have tried to install cygwin a different way so that the installed files aren't owned by SYSTEM? – Sinc – 2019-02-21T18:44:15.390

It is a glitch of windows. It is irrilevant for cygwin or for other windos program to not be able to know who is the owner of those files, as they are only used by the SYSTEM itself – matzeri – 2019-02-21T19:21:43.860

Let me look at it another way: If the config/systemprofile directory is commonly going to be permission denied why is cygwin trying to use it? – Sinc – 2019-02-21T19:27:50.730