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

Thrall, Bryan bryan.thrall@flightsafety.com
Mon Jun 19 22:47:00 GMT 2006


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).

-- 
Bryan Thrall
FlightSafety International
Bryan.Thrall@flightsafety.com

.



More information about the Cygwin-apps mailing list