Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Date: Mon, 7 Nov 2005 15:40:22 -0500 (EST)
From: Igor Pechtchanski <pechtcha@cs.nyu.edu>
Reply-To: cygwin@cygwin.com
To: Sam Steingold <sds@gnu.org>
cc: cygwin@cygwin.com
Subject: Re: chmod: Permission denied
In-Reply-To: <ufyq8uu3q.fsf@gnu.org>
Message-ID: <Pine.GSO.4.63.0511071536590.847@slinky.cs.nyu.edu>
References: <uk6fkuwju.fsf@gnu.org>  <Pine.GSO.4.63.0511071357550.847@slinky.cs.nyu.edu>  <ufyq8uu3q.fsf@gnu.org>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII

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

> 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.
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
     |,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:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

