delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/11/07/15:40:38

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Mon, 7 Nov 2005 15:40:22 -0500 (EST)
From: Igor Pechtchanski <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: Sam Steingold <sds AT gnu DOT org>
cc: cygwin AT cygwin DOT 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 DOT fsf AT gnu DOT org> <Pine DOT GSO DOT 4 DOT 63 DOT 0511071357550 DOT 847 AT slinky DOT cs DOT nyu DOT edu> <ufyq8uu3q DOT fsf AT gnu DOT org>
MIME-Version: 1.0

On Mon, 7 Nov 2005, Sam Steingold wrote:

> > * Igor Pechtchanski <crpugpun AT pf DOT alh DOT 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 AT cs DOT nyu DOT edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor AT watson DOT ibm DOT 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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019