Koozali.org: home of the SME Server

did the FAQ# 6q12 now lost all Ibays

Dennis Pecynski

did the FAQ# 6q12 now lost all Ibays
« on: August 10, 2002, 03:03:56 AM »
some one tell me what to do, Just wanted to change value in open_basedir for one Ibay...did what I was supposed to do in FAQ 6q12...even was instructed on my progress...when script took  I lost my ibays....they are there but cannot access them from outside..cannot use server manager except on server itself.....I still have email yet.  I cannot see or use my website..Please guide me thru this.

Dennis Pecynski

Re: did the FAQ# 6q12 now lost all Ibays
« Reply #1 on: August 10, 2002, 10:59:18 PM »
Ok I have found by rebooting and watching load sequence I have a syntax error on line 1507....I have the file name and file..could someone please instruct me on how to correct this...IE...do I  type in file and retype syntax?...someway of viewing what is there?...I am not helpless just do not have the knowledge or experience yet..and do not want to srew it up worse.

Any help will be deeply appreciated...Thanks  Dennis

Jon Blakely

Re: did the FAQ# 6q12 now lost all Ibays
« Reply #2 on: August 11, 2002, 06:33:55 AM »
Dennis,

what file is the syntax error in??.

Jon

Dennis Pecynski

Re: did the FAQ# 6q12 now lost all Ibays
« Reply #3 on: August 11, 2002, 07:07:26 AM »
Thanks for the reply...This is exactly what I see on reboot

Starting  httpd-e-smith:  Starting httpd: Syntax error on line 1507 of  /ect/httpd/config/httpd.config:

Invalid command '/sbin/e-smith/expand-template' , perhaps mis-spelled or defined by a modual not included in the server configuration



anything you could guide me through would be deeply apreceated!!

Jon Blakely

Re: did the FAQ# 6q12 now lost all Ibays
« Reply #4 on: August 11, 2002, 08:42:57 AM »
Ok

First off, lets undo what you have done so far

# /sbin/e-smith/db accounts delprop your_i-bay_name PHPBaseDir
# /sbin/e-smith/signal-event ibay-modify your_i-bay_name

then try

# /etc/e-smith/expand-template /etc/httpd/conf/httpd.conf
# /etc/rc.d/init.d/httpd-e-smith restart

post any error messages

Jon

Dennis Pecynski

Re: did the FAQ# 6q12 now lost all Ibays
« Reply #5 on: August 11, 2002, 09:26:54 AM »
I do not have a directory  or file of expand-template

Jon Blakely

Re: did the FAQ# 6q12 now lost all Ibays
« Reply #6 on: August 11, 2002, 09:39:42 AM »
Ok, I wonder where that went??.

# pico /sbin/e-smith/expand-template

and copy and paste the below into it

#!/usr/bin/perl -w

#----------------------------------------------------------------------
# copyright (C) 2002 Mitel Networks Corporation
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
#
# Technical support for this program is available from Mitel Networks
# Please visit our web site www.e-smith.com for details.
#----------------------------------------------------------------------

package esmith;

use strict;
use Errno;
use esmith::util;
use Getopt::Long;
use esmith::config;

tie my %conf, 'esmith::config';

my %options = ();

GetOptions(\%options, 'output_filename=s', 'expand_queue=s');

$options{'template_path'} = $ARGV[0];

$options{'output_filename'} = $options{'template_path'}
    unless ( exists $options{'output_filename'} );


my %args = (
                CONFREF         => \%conf,
                TEMPLATE_PATH   => $options{'template_path'},
                OUTPUT_FILENAME => $options{'output_filename'},
            );

$args{TEMPLATE_EXPAND_QUEUE} = [$options{'expand_queue'}]
  if exists $options{expand_queue};

if ( -f $options{'output_filename'} )
{
    # If the target file exists, preserve its ownership and mode
    use File::stat;

    my $f = stat($options{'output_filename'} );
    $args{UID}   = $f->uid;
    $args{GID}   = $f->gid;
    $args{PERMS} = $f->mode;
}

esmith::util::processTemplate(\%args);

save and chmod to 554 and try to expand httpd again

Dennis Pecynski

Re: did the FAQ# 6q12 now lost all Ibays
« Reply #7 on: August 11, 2002, 09:44:29 AM »
this may sound stupid....I have it in my window...how do I save it?

Dennis Pecynski

Re: did the FAQ# 6q12 now lost all Ibays
« Reply #8 on: August 11, 2002, 09:50:40 AM »
when I put in ...pico /sbin/e-smith/expand-template

the rest came up by itself...did not have to cut and paste

Dennis Pecynski

Re: did the FAQ# 6q12 now lost all Ibays
« Reply #9 on: August 11, 2002, 10:09:43 AM »
figured it out....

Dennis Pecynski

Re: did the FAQ# 6q12 now lost all Ibays
« Reply #10 on: August 11, 2002, 10:16:55 AM »
ok saved expand-template...tryed script again...cut and paste...so no typo's
and got this responce

bash: /ect/e-smith/expand-template: no such file or directory

Rich Lafferty

Re: did the FAQ# 6q12 now lost all Ibays
« Reply #11 on: August 11, 2002, 11:33:53 AM »
Dennis Pecynski wrote:
>
>
> ok saved expand-template...tryed script again...cut and
> paste...so no typo's
> and got this responce
>
> bash: /ect/e-smith/expand-template: no such file or directory

Well, "ect" is a pretty severe typo for "sbin". :-) (It's a milder one for
"etc", but that's not where that script is located.)

--Rich

Jon Blakely

Re: did the FAQ# 6q12 now lost all Ibays
« Reply #12 on: August 11, 2002, 11:45:34 AM »
Oops, my typo

# /sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf

Jon

Dennis Pecynski

Re: did the FAQ# 6q12 now lost all Ibays
« Reply #13 on: August 11, 2002, 08:11:43 PM »
now......syntax error line 1507 of /ect/config/httpd.config: Invalid command /sbin/e-smith/expand-template.


Hey remember in my first post..I told you before anyone tryed to guide me..I did the sandbox disable?.....wonder if that may be causing any problems?...at that time..after disable...everything still worked...but because of the changes we have done here maybe ..there is a clash of some sort.

Jon Blakely

Re: did the FAQ# 6q12 now lost all Ibays
« Reply #14 on: August 12, 2002, 02:35:48 AM »
Ok its time to take a look at line 1507

/etc/httpd/conf/httpd.conf

and post that line and maybe a couple above and below.

jon

Dennis Pecynski

Re: did the FAQ# 6q12 now lost all Ibays
« Reply #15 on: August 12, 2002, 02:46:53 AM »
bash: /etc/httpd/conf/httpd.conf   permission denied

Dennis Pecynski

Re: did the FAQ# 6q12 now lost all Ibays
« Reply #16 on: August 12, 2002, 03:16:55 AM »
ok....typed in....

view /etc/httpd/conf/httpd.conf..

got into file...only problem is...have to figure out line 1507...

Dennis Pecynski

Re: did the FAQ# 6q12 now lost all Ibays
« Reply #17 on: August 12, 2002, 04:38:12 AM »
changed permission on  /etc/httpd/conf/httpd.conf   got it to open...almost every line   command not found...

at the end...line 217 : syntax error near unexpected token  'mod_ssl.c>'

/etc/httpd/conf/httpd.conf:  line 217  ''

Jon Blakely

Re: did the FAQ# 6q12 now lost all Ibays
« Reply #18 on: August 12, 2002, 04:57:32 AM »
Use mc to open the file

log in as root

# mc

That will open a norton commander style directory. scroll to /etc/httpd/conf/httpd.conf.

press F4

This will open the file and you will be able to scroll to line 1507. At the top you will see
httpd.conf          [----]  0 L:[358+24 382/1686] *(13253/50216b)= D 68 44H

382/1686 is the current line and the total lines.

Jon

Dennis Pecynski

Re: did the FAQ# 6q12 now lost all Ibays
« Reply #19 on: August 12, 2002, 05:34:06 AM »
line  1506= blank....

line 1507 = sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf

line  1508 = ervice httpd restartProgram fragment at line 2 delivered error ' ' syntax error ' '


I see a space at line 1507 end of expand-template and slash

I see what looks like should be "service" at the begining of 1508...but no "s"

Dan Brown

Re: did the FAQ# 6q12 now lost all Ibays
« Reply #20 on: August 12, 2002, 06:09:22 AM »
Wow, that's the most amazingly hosed httpd.conf I've ever seen.  Try this, from the shell prompt:

# ls /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf

  If this comes back with an error that the directory doesn't exist, fine.  If not, post what it indicates.  If there are no files, do this, again at the shell prompt, and post the _exact_ output:

# /sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf
# /etc/rc.d/init.d/httpd-e-smith restart

If it runs without errors, how's your system?

Dennis Pecynski

Re: did the FAQ# 6q12 now lost all Ibays
« Reply #21 on: August 12, 2002, 06:13:33 AM »
95AddType00PHP2ibays.save

Dan Brown

Re: did the FAQ# 6q12 now lost all Ibays
« Reply #22 on: August 12, 2002, 06:23:46 AM »
OK, try this:

# pico /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/95AddType00PHP2ibays.save

(all on one line) What's in that file?

Dennis Pecynski

Re: did the FAQ# 6q12 now lost all Ibays
« Reply #23 on: August 12, 2002, 06:32:49 AM »
file name too long

Dennis Pecynski

Re: did the FAQ# 6q12 now lost all Ibays
« Reply #24 on: August 12, 2002, 06:37:32 AM »
ok.....got into by getting into directory first then pico...too much to post....very long file

Dan Brown

Re: did the FAQ# 6q12 now lost all Ibays
« Reply #25 on: August 12, 2002, 07:01:31 AM »
Ah, OK, do this then:

# cd /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf
# pico 95AddType00PHP2ibays.save

Dan Brown

Re: did the FAQ# 6q12 now lost all Ibays
« Reply #26 on: August 12, 2002, 07:03:36 AM »
Well, that doesn't look like a file that should be there.  Try removing it (or moving it somewhere outside of /etc/e-smith, like to /root), and then re-expanding the httpd.conf file (using the expand-template command I posted previously).

Dennis Pecynski

Re: did the FAQ# 6q12 now lost all Ibays
« Reply #27 on: August 12, 2002, 07:17:05 AM »
this is where that file came from

http://forums.contribs.org/index.php?topic=12706.msg47725#msg47725

How do I remove it?...
rm un_wanted_file (enter)?

 "reply". remove  un_wanted_file?..(press Y) ?

is that correct?

Dan Brown

Re: did the FAQ# 6q12 now lost all Ibays
« Reply #28 on: August 12, 2002, 07:21:13 AM »
Yep, that's correct.

Dennis Pecynski

Re: did the FAQ# 6q12 now lost all Ibays
« Reply #29 on: August 12, 2002, 07:29:45 AM »
It made a new file..95AddType00PHP2ibays.save.save

shows lost of conflicks when I use the expand script.

Dan Brown

Re: did the FAQ# 6q12 now lost all Ibays
« Reply #30 on: August 12, 2002, 07:41:14 AM »
you did rm 95AddType00PHP2ibays.save, and it created a new file?  Do you have some kind of wierd file-protection running?  Try this:

# rm -rf /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf

...and then do this, as posted above:

If there are no files, do this, again at the shell prompt, and post the _exact_ output:

# /sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf
# /etc/rc.d/init.d/httpd-e-smith restart

    Note, "lost of conflicks" does not qualify as exact output.

Dennis Pecynski

Re: did the FAQ# 6q12 now lost all Ibays
« Reply #31 on: August 12, 2002, 07:46:07 AM »
shutting down httpd:  [failed]
starting httpd:           [ OK]

Dan Brown

Re: did the FAQ# 6q12 now lost all Ibays
« Reply #32 on: August 12, 2002, 07:48:32 AM »
...and does it work now?

Dennis Pecynski

Re: did the FAQ# 6q12 now lost all Ibays
« Reply #33 on: August 12, 2002, 08:00:01 AM »
Yes....and a VERY STRONG THANKYOU!!!!!!!

I even went thru and did the FAQ#6q12 again...and everything works great...


Thanks again Dan......(FYI...a very useful learning experience...I really got familar with the root system of my server....I am very comftable with it now...I realize the extreme importance of watching my typing now).


Thanks again