This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How to handle changed user ID

On Dec  7 09:12, cyg Simple wrote:
> On 12/7/2017 2:50 AM, Thomas Wolff wrote:
> > I had to delete a corrupted Windows account and recreate it.
> > For cygwin, the new account, although with the same name, has a
> > different user id.
> > Of course, this creates access problems for existing files (even if they
> > appear to have the same user in ls -l, because the *old user* is still
> > listed in /etc/passwd).
> > Is there a canonical solution to this problem, other than running chown
> > -R $USER ~ ?
> > Can the new user be forced to use the previous user ID?
> What happens if you simply remove /etc/passwd and /etc/group files?  A
> change long ago caused these files to not be needed.
> You may need to take ownership of the directories and their files at the
> Windows system level.

Definitely, and this is independent of Cygwin.  The files have been
created with the Windows SID of the old user and thus the ownership
is still set to the old user.  Either taking ownership in Windows,
or starting a shell as admin and using chown -R (or more intelligent
variations using find) should do it.


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

Attachment: signature.asc
Description: PGP signature

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]