Mail Archives: cygwin/2005/09/19/12:23:04
----Original Message----
>From: Larry Hall
>Sent: 19 September 2005 03:50
> At 12:28 PM 9/17/2005, you wrote:
>> ---------- Forwarded message ----------
>> From: Krister Svanlund <oooooooooops@>
^^^^^^^^^^^^^
Larry? You know what I'm about to say, so I won't even say it! :)
>> Date: Sep 17, 2005 5:22 PM
>> Subject: Lost user/group permissions after reinstallation of Cygwin
>> I have major problems here, I reinstalled my computer, and while doing
>> this i removed cygwin (except for my home directory) and when i later
>> reinstalled cygwin its all fubar. I don't have permission to read,
>> write, execute, delete, rename, flush down the toilet or anything...
>> on certain files atleast. As I have noticed all the user and group
>> settings for the files are set to question marks (? that is).
> From your general description it sounds like
> '/etc/postinstall/passwd-grp.sh' didn't run. Check if this file exists
> or if one with the suffix of ".done" exists. If the latter, run the
> script and rename it with the ".done" suffix. Otherwise, check your
> '/etc/passwd' and '/etc/group' files to see if your user name and group
> are in these files. If not, read 'man mkpasswd' and 'man mkgroup' to
> find out how to generate the files to contain the info you need.
I think the problem is actually more likely to be that reinstalling the OS
on top of the existing system will have generated an entirely new machine
SID and hence new user account SIDs, and so all the ACLs on the old files
from before the reinstall will be related to SIDs that no longer make any
sense at all to the security subsystem.
If this was an entire cygwin tree, it would be practically impossible to
recover, but since it's the home dir and nothing else, all that Krister
should need to do is 1) regenerate the /etc/passwd and /etc/group files,
then 2) cd into the home dir, and "chown -R <user:group> *" to take back all
the files.
The username should be Krister's login username, and group should be
either "Users" or "Domain Users", according to whether Krister's login is a
local account or a domain account.
In fact, the simplest way to figure it out (automatically) might be
something like:
mkpasswd -l [-d if in domain] > /etc/passwd
mkgroup -l [-d if in domain] > /etc/group
<exit bash shell, start up new one, just to be sure the changes have
'taken'>
touch /foo.bar
chown -R --reference=/foo.bar ~
...or words to that effect.
cheers,
DaveK
--
Can't think of a witty .sigline today....
--
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 -