ssh-host-config doesn't chown /var/empty properly from setup.exe

Igor Peshansky
Tue Jun 20 00:04:00 GMT 2006

On Mon, 19 Jun 2006, Thrall, Bryan wrote:

> Igor Peshansky wrote on Monday, June 19, 2006 4:41 PM:
> > On Mon, 19 Jun 2006, Thrall, Bryan wrote:
> >
> >> I've created a package which does some automatic configuration in its
> >> postinstall script, including running `ssh-host-config -y <
> >> /dev/null`. When setup.exe runs this postinstall script,
> >> ssh-host-install works almost perfectly, except that it doesn't
> >> chown /var/empty properly: /var/empty ends up owned by the user who
> >> is running setup.exe and group "none" when it should be SYSTEM.root.
> >> It also ends up with 700 permissions instead of 755.
> >>
> >> ssh-host-config has no problems when run from an xterm or tty; I've
> >> only noticed it happening when executed from a postinstall script.
> >> I'm trying to install on a WinXP machine, the user has
> >> administrative privileges, and I tested the latest setup snapshot
> >> (2.529) but no luck. I didn't notice any obvious clues from the
> >> setup source, either.
> >>
> >> Any suggestions? Cygcheck output from the target machine is
> >> attached, in case it helps.
> >
> > At a guess, your package is not dependent on the "base-passwd"
> > package, and thus setup is free to run your postinstall script before
> > /etc/passwd is created (which would result in chown not knowing who
> > SYSTEM or root is).  Add base-passwd to the "requires:" line of your
> > setup.hint, and see if it helps.
> >
> > You can check that by looking at the order of script execution in
> > setup.log.full.
> > 	Igor
> Actually, I get the same results even if I try to install my package as
> a separate step, after completely installing all the standard Cygwin
> packages I need (Sorry I didn't make that clear). I'm testing on a
> machine with a working Cygwin installation and just reinstalling my
> package (I delete /var/empty and cygrunsrv -R sshd before each attempt,
> so ssh-host-config has something to do). Running ssh-host-config in the
> same context (working Cygwin, no /var/empty, sshd not installed as a
> service), but from an xterm or tty sets up /var/empty just fine.
> I just confirmed that /etc/passwd has the user, SYSTEM, and sshd in it,
> and /etc/group has root (just in case that could've still been the
> problem).

Hmm, ok, the next thing to check is the fact that PATH and other
environment variables may not be set the same.  Try adding some debugging
information to the postinstall script (or even change the shebang line to
"bash -x"), and see what's different in setup.exe and the command line.
      |\      _,,,---,,_ |
ZZZzz /,`.-'`'    -.  ;-;;,_		Igor Peshansky, Ph.D. (name changed!)
     |,4-  ) )-,_. ,\ (  `'-'		old name: Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"Las! je suis sot... -Mais non, tu ne l'es pas, puisque tu t'en rends compte."
"But no -- you are no fool; you call yourself a fool, there's proof enough in
that!" -- Rostand, "Cyrano de Bergerac"

More information about the Cygwin-apps mailing list