This is the mail archive of the 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: What are the correct permissions for cygwin and how do I setthem ?

On Wed, 1 Oct 2003, Olaf Föllinger wrote:

> Hi,
> I'm using w2k. Today I've been migrated to a new domain so now I do have
> new sids.
> Of course the permissions of my files are now wrong. How do I correct
> them ? Whome they should belong to ? I've renewed /etc/passwd and
> /etc/groups using
> mkgroup -d >/etc/group
> mkpasswd -d >/etc/passwd
> but this seems not enough. What else should I try ? E.g. mutt dumps
> while accessing a local mailbox.
> Gruss Olaf Föllinger


Do you mean that you are now logging in as another domain user?  You
should then simply chown any files that were owned by the old user to the
new user...  I'd suggest finding out the UID of the old domain user (by
doing "ls -lnd ~", for example (if the username didn't change), and then
running something like

  export OLDUID=`ls -lnd ~ | cut -d ' ' -f 4`
  export UID=`id -u`
  chown -R --from=$OLDUID $UID

Alternatively, you could try a more conventional command, e.g.,

  find / -user $OLDUID -print0 | xargs -0 -n 50 chown $UID

You may need to change the group as well if the domain has different group
      |\      _,,,---,,_
ZZZzz /,`.-'`'    -.  ;-;;,_
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster."  -- Patrick Naughton

Unsubscribe info:
Problem reports:

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