Subject: RE: man.conf missing after cygwin upgrade
From: <[email-masked]>
To: <[email-masked]>
Cc: <[email-masked]>
Date: Tue, 5 Jul 2005 08:56:24 +0200

> On Mon, 4 Jul 2005, FischRon.external wrote:
> 
> > After upgrading cygwin to the most recent version, I found that man
> > pages aren't displayed anymore; for example
> >
> >   $ man man
> >   Warning: cannot open configuration file /usr/share/misc/man.conf
> 
> That's not good...
[snip]
> > Now it does display the man-page, but before this it also writes the
> > aforementioned error message.
> 
> Sure it would.  You're missing a config file, and man can't 
> forgive that.
> 
> > Next I did
> >
> >   $ /usr/sbin/makewhatis
> >   $ man -k shell
> >
> > Now I get that error message *twice* (but then man -k displays an
> > overview of the available shell commands, as expected). Now 
> I checked
> > /usr/share/misc and found that it has permissions 000. I chmod the
> > permissions to 0777. Also I found that /usr/share/misc is 
> empty, i.e.
> > there is no file man.conf in it.
> 
> Ah, that could be the reason -- permissions 000 would make 
> the postinstall
> script fail when copying the man.conf file from its default 
> location.  

I found that all in a while, a file created under cygwin ends up
with permission 000...

> If
> you haven't run setup since upgrading man, see if 
> /var/log/setup.log.full
> has any messages from /etc/postinstall/man.sh.

Nothing useful. man.sh is mentioned only once:

    Installing file cygfile:///etc/postinstall/man.sh

man.conf is mentioned in several directories, such as

   Installing file cygfile:///usr/share/man/pt/man5/man.conf.5

but never in /usr/share/misc (where man is obviously looking for it).

The only thing which might look like an error message does not seem
related to the man problem:

   2005/07/04 12:27:54 zsh
   2005/07/04 12:27:54 running: C:\cygwin\bin\sh.exe -c
/etc/postinstall/base-files-mketc.sh
   Unknown system type ; exiting

> You should re-run /etc/postinstall/man.sh.done 

I guess you mean: /etc/postinstall/man.sh  - there is no file
/etc/postinstall/man.sh.done

This went very quickly, and it created the file:

   /etc/postinstall $ man.sh
   Using the default version of /usr/share/misc/man.conf
(/etc/defaults/usr/share/misc/man.conf)
   /etc/postinstall $ ls -l /usr/share/misc/man.conf
   -rw-r--r--  1 fischron mkgroup_l_d 4576 Jul  5 08:46
/usr/share/misc/man.conf

and now the error message on invoking man does not appear anymore.

Thank you for helping!

> Now that your /usr/share/misc has better permissions, future 
> man upgrades
> should work.  If I were you, I'd investigate *why* 
> /usr/share/misc ended
> up with 000 permissions in the first place (it's created by setup.exe
> using the inherited Windows permissions -- are the ACLs on / 
> too strict?).

As far I can tell, they look fine:

$ getfacl /
# file: /
# owner: Administrators
# group: mkgroup_l_d
user::rwx
group::rwx
group:SYSTEM:rwx
mask:rwx
other:rwx
default:user:Administrators:rwx
default:group:SYSTEM:rwx
default:mask:rwx

I found that files with permission 000 are sometimes created when we
run build scripts via ant. Just in case you are not familiar: ant is
a tool for producing applications (used for similar tasks as one would
use make), which is used a lot by Java developers. ant is a Java
application,
but of what I have seen, it uses the cygwin library (because it is
platform
independent). In most cases, things work fine, but sometimes, certain
files are created with 000. We have never found out why this happens,
and regularly do a chmod afterwards.

Regards,

Ronald

--
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/