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: chmod: Permission denied

On Mon, 7 Nov 2005, Sam Steingold wrote:

> > * Igor Pechtchanski <crpugpun@pf.alh.rqh> [2005-11-07 13:58:16 -0500]:
> >
> > On Mon, 7 Nov 2005, Sam Steingold wrote:
> >
> >> my windows login domain has changed and now I cannot chmod the files
> >> that I created when I was logged in using my previous login domain.
> >> how can I fix this?
> >> do I need to do
> >> find . -exec 'cp -p {} {}.new; mv {}.new {}' \;
> >> (or something)?
> >
> > After you update your /etc/passwd, does "chown" work?
> you mean chmod?

Nope, I meant "chown".  If the old owner of the file is defunct, the new
user might as well take ownership -- that should also allow changing

> I fixed the login domain in /etc/passwd, nothing changed
> - how do I tell cygwin to re-read /etc/passwd?

This should happen automatically -- no need to restart things.

> I killed all cygwin processes, but this did not help
> (I guess I have to manually unload cydwin1.dll)

Did you also fix the SID?  I suggest doing a

mkpasswd -d -u YOURUSER YOURNEWDOMAIN >> /etc/passwd

and then renaming the old user in /etc/passwd to something like
"YOURUSER_old".  You can make the appropriate changes to the home
directory and login shell fields, as needed.
      |\      _,,,---,,_
ZZZzz /,`.-'`'    -.  ;-;;,_
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

If there's any real truth it's that the entire multidimensional infinity
of the Universe is almost certainly being run by a bunch of maniacs. /DA

Unsubscribe info:
Problem reports:

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