Greetings, Brent Epp!

> I recently (finally) installed Windows 10 on my system (clean install). 
> All of my files are stored in on a secondary drive/partition, on which
> cygwin is also installed.  I expected to be able to just pick up where I
> left off, but I'm getting all sorts of permissions issues with cygwin.  I
> did run the cygwin setup again to reinstall/upgrade.

> First, I had restore my cygwin home directory from a backup, since it was
> giving me permissions errors on .bash_history, .ssh, etc, but the biggest
> headache is with git repos.  First, it gives a "fatal: unsafe repository"
> error.  If I add it to the safe directories list, it git still has to
> reindex the repo every time I run `git status`, and it still fails when I try 
> to enter a commit.

> It seems most or everything is owned by "Administrators".  The only way
> I've been able to fix this is to go through the Windows advanced permissions
> dialog, change the owner to my user, and set all sub-objects to inheritable
> permissions, but I'm very leery about mass changes like this.

> Why did this happen?  And is there a better/safer/correct way to fix this?

The only way is to install a clean copy of Cygwin and carefully copy your
changes over. This will ensure that all permissions are set correctly, and all
programs are rebased correctly as well.
This is because Windows uses a very different file access control that that of
simple POSIX permissions, on top of which Cygwin emulates them.
If you want your pain to be somewhat less in the future, move your home away
from Cygwin directory and use noacl flag on it, which will defer permissions
control to the underlying OS layer.
I'm using my Windows profile as Cygwin home, but your mileage may vary.


-- 
With best regards,
Andrey Repin
Sunday, May 8, 2022 18:32:07

Sorry for my terrible english...

-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

Reply via email to