You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@directory.apache.org by "Martin Schuster (IFKL IT OS DSM CD)" <Ma...@infineon.com> on 2008/05/13 12:17:46 UTC

[ApacheDS] I had a /root, but Apache ated it

I gave the installer a try; downloaded it with my user account, su -
to root, and ran it:

mybox /opt # . /home/joe/data-local/install/apacheds-1.5.2-x86_64.bin
                   WELCOME TO THE APACHE DS INSTALLER PROGRAM
[...]
Do you agree to the above license terms? [yes or no]
yes
Unpacking the installer...
tail: u: invalid number of seconds
Extracting the installer...

gzip: stdin: unexpected end of file
tar: Child returned status 1
tar: Error exit delayed from previous errors
-su: cd: sh: No such file or directory
-su: ./install.sh: No such file or directory
Done.
Apache DS has been installed successfully.
joe@mybox ~/data-local/install $

Afterwards, there was an empty __tmp.tar.gz in /opt,
and my /root was gone. Ouch. Even if tail, gzip, tar
or whatever fails, you should never remove my /root

(just wanted to report this. I'll manage with the good ol' tarball :)

-- 
Infineon Technologies IT-Services GmbH   Martin.Schuster1@infineon.com
Lakeside B05, 9020 Klagenfurt, Austria   Martin Schuster
         FB: LG Klagenfurt, FN 246787y   +43 5 1777 3517

Re: [ApacheDS] I had a /root, but Apache ated it

Posted by Pierre-Arnaud Marcelot <pa...@marcelot.net>.
Thanks for the complete debugging...

We only have some error managment code in the install.sh script. You're
right we should also have this in the bootstrap code.

I'll create a JIRA in order to correct this issue for the next Apache DS
release.

Thanks.
Pierre-Arnaud

On Tue, May 13, 2008 at 2:19 PM, Martin Schuster (IFKL IT OS DSM CD) <
Martin.Schuster1@infineon.com> wrote:

> Pierre-Arnaud Marcelot wrote:
> > Hi Martin,
> >
> > Ouch!... Sorry about that...
> >
> > Thanks for reporting. You're the first one to have this kind of error.
> >
> > Could you please give us more information on your system?
> >
> This is a Gentoo-box, but I think this is not related to the problem.
>
> The problem seems to come from the fact that the installer uses
> tail -n +239 $0 > $archiveName
> but $0 is  "-su"  when the installer is called with
> . /path/to/installer
> after having used su to change to the root user.
>
> (of course, calling it that way was a stupid mistake on my side).
>
> Now the tail command fails, thus the untarring fails, so there is no "sh"
> directory, which leads to awful things when you are in e.g. /opt:
>
> cd sh                 <-- does not work
> . ./install.sh        <-- does not work (unless there already is an
> install.sh
>                                         which would lead to strange
> effects)
> # Cleaning
> cd ..                 <-- this _DOES_ work -- I'm now in /
> rm -rf sh             <-- does not work, unless there is an directory "sh"
> rm -rd root           <-- eats my $HOME
>
>
> You should definitely put some    || exit
> stuff in the installer :)
>
> hth
> --
> Infineon Technologies IT-Services GmbH   Martin.Schuster1@infineon.com
> Lakeside B05, 9020 Klagenfurt, Austria   Martin Schuster
>         FB: LG Klagenfurt, FN 246787y   +43 5 1777 3517
>

Re: [ApacheDS] I had a /root, but Apache ated it

Posted by "Martin Schuster (IFKL IT OS DSM CD)" <Ma...@infineon.com>.
Pierre-Arnaud Marcelot wrote:
> Hi Martin,
> 
> Ouch!... Sorry about that...
> 
> Thanks for reporting. You're the first one to have this kind of error.
> 
> Could you please give us more information on your system?
> 
This is a Gentoo-box, but I think this is not related to the problem.

The problem seems to come from the fact that the installer uses
tail -n +239 $0 > $archiveName
but $0 is  "-su"  when the installer is called with
. /path/to/installer
after having used su to change to the root user.

(of course, calling it that way was a stupid mistake on my side).

Now the tail command fails, thus the untarring fails, so there is no "sh"
directory, which leads to awful things when you are in e.g. /opt:

cd sh                 <-- does not work
. ./install.sh        <-- does not work (unless there already is an install.sh
                                         which would lead to strange effects)
# Cleaning
cd ..                 <-- this _DOES_ work -- I'm now in /
rm -rf sh             <-- does not work, unless there is an directory "sh"
rm -rd root           <-- eats my $HOME


You should definitely put some    || exit
stuff in the installer :)

hth
-- 
Infineon Technologies IT-Services GmbH   Martin.Schuster1@infineon.com
Lakeside B05, 9020 Klagenfurt, Austria   Martin Schuster
         FB: LG Klagenfurt, FN 246787y   +43 5 1777 3517

Re: [ApacheDS] I had a /root, but Apache ated it

Posted by Pierre-Arnaud Marcelot <pa...@marcelot.net>.
Hi Martin,

Ouch!... Sorry about that...

Thanks for reporting. You're the first one to have this kind of error.

Could you please give us more information on your system?

Thanks,
Pierre-Arnaud Marcelot

On Tue, May 13, 2008 at 12:17 PM, Martin Schuster (IFKL IT OS DSM CD) <
Martin.Schuster1@infineon.com> wrote:

> I gave the installer a try; downloaded it with my user account, su -
> to root, and ran it:
>
> mybox /opt # . /home/joe/data-local/install/apacheds-1.5.2-x86_64.bin
>                   WELCOME TO THE APACHE DS INSTALLER PROGRAM
> [...]
> Do you agree to the above license terms? [yes or no]
> yes
> Unpacking the installer...
> tail: u: invalid number of seconds
> Extracting the installer...
>
> gzip: stdin: unexpected end of file
> tar: Child returned status 1
> tar: Error exit delayed from previous errors
> -su: cd: sh: No such file or directory
> -su: ./install.sh: No such file or directory
> Done.
> Apache DS has been installed successfully.
> joe@mybox ~/data-local/install $
>
> Afterwards, there was an empty __tmp.tar.gz in /opt,
> and my /root was gone. Ouch. Even if tail, gzip, tar
> or whatever fails, you should never remove my /root
>
> (just wanted to report this. I'll manage with the good ol' tarball :)
>
> --
> Infineon Technologies IT-Services GmbH   Martin.Schuster1@infineon.com
> Lakeside B05, 9020 Klagenfurt, Austria   Martin Schuster
>         FB: LG Klagenfurt, FN 246787y   +43 5 1777 3517
>