Koozali.org: home of the SME Server
Obsolete Releases => SME 7.x Contribs => Topic started by: AlexG on April 25, 2008, 10:20:43 AM
-
Hi Forum
After updating the server and following the instructions from 'cactus' the server seems to be normal again. But it is not possible to open my oscommerce page anymore:
Forbidden
You don't have permission to access /oscommerce on this server.
Is this because the updates or do I something wrong?
-
Hi Forum
After updating the server and following the instructions from 'cactus' the server seems to be normal again. But it is not possible to open my oscommerce page anymore:
Forbidden
You don't have permission to access /oscommerce on this server.
Is this because the updates or do I something wrong?
What does /var/log/httpd/error_log say at the time you had the error?
-
[Fri Apr 25 16:41:23 2008] [error] [client 192.168.1.10] client denied by server configuration: /opt/oscommerce
-
[Fri Apr 25 16:41:23 2008] [error] [client 192.168.1.10] client denied by server configuration: /opt/oscommerce
Nothing more than that? Does the /var/log/messages hold perhaps hold any clues from around that time?
You did do the following after install?
signal-event post-upgrade
signal-event reboot
-
Yes, I did the signal-event post-upgrade, signal-event reboot and there is just:
[Fri Apr 25 15:54:23 2008] [error] [client 66.249.73.105] File does not exist: /home/e-smith/files/ibays/Primary/html/robots.txt
[Fri Apr 25 16:06:57 2008] [notice] Graceful restart requested, doing restart
[Fri Apr 25 16:08:23 2008] [notice] Apache configured -- resuming normal operations
[Fri Apr 25 16:09:23 2008] [notice] Graceful restart requested, doing restart
[Fri Apr 25 16:09:23 2008] [notice] Digest: generating secret for digest authentication ...
[Fri Apr 25 16:09:23 2008] [notice] Digest: done
[Fri Apr 25 16:09:24 2008] [warn] RSA server certificate CommonName (CN) `sme-1.Domainname.com' does NOT match server name!?
[Fri Apr 25 16:09:24 2008] [notice] Apache configured -- resuming normal operations
[Fri Apr 25 16:41:23 2008] [error] [client 192.168.1.10] client denied by server configuration: /opt/oscommerce
Best regards
AlexG
-
Strange... what are the permissions and ownership on /opt/oscommerce?
-
I found this:
[Fri Apr 25 15:54:23 2008] [error] [client 66.249.73.105] File does not exist: /home/e-smith/files/ibays/Primary/html/robots.txt
[Fri Apr 25 16:06:57 2008] [notice] Graceful restart requested, doing restart
-
I found this:
[Fri Apr 25 15:54:23 2008] [error] [client 66.249.73.105] File does not exist: /home/e-smith/files/ibays/Primary/html/robots.txt
[Fri Apr 25 16:06:57 2008] [notice] Graceful restart requested, doing restart
Nothing wrong with that AFAIK, the first line is most likely a search engine robot requesting the robots.txt file to see if and what part of your server it is allowed to index, the second part most likely is the restart because of the upgrade of smeserver-oscommerce, did you install around that time?
Please answer the question in my previous post.
-
There is no opt/oscommerce anymore
only administration, webshare and webshare-tools
-
There is no opt/oscommerce anymore
Really? Than that is the reason why you get the error. Do you have a backup of your server?
What is the output of: rpm -q smeserver-oscommerce
-
No, I don't have a backup
rpm -q smeserver-oscommerce: smeserver-oscommerce-2.2rc1-3.el4.sme
-
No, I don't have a backup
rpm -q smeserver-oscommerce: smeserver-oscommerce-2.2rc1-3.el4.sme
That is strange, that states that it is installed. Is there anything listed in /opt, perhaps oscommerce.tgz?
Does this command list your oscommerce database?
mysql -e "SHOW DATABASES"
-
No, it doesn't and it seems that I can not login into phpmyadmin-multi anymore.
In the folder /opt are only: /administration; /webshare and /webshare-tools
-
No, it doesn't and it seems that I can not login into phpmyadmin-multi anymore.
You are logged in as root, when issuing those commands, are you?
If so you might have a serious problem, are you sure you did not actually remove something in the /opt folder? Does this output anything?
history | grep rm
-
Yezzz, I am root and the result of history | grep opt is:
history | grep rm
388 wget www.xx.de/form1.php
390 wget www.xx.de/form1.php
392 wget www.xx.de/form1.php
393 del form1.php
394 rem form1.php
396 rem form1.php
397 wget www.xx.de/form1.php
399 wget www.xx.de/form1.php
401 wget www.xx.de/formx1.php
402 wget www.xx.de/formmailerx1.php
405 wget www.xx.de/formmailerx1.php
407 wget www.xx.de/formm1.php
408 wget www.xx.de/formx1.php
410 wget www.xx.de/formm1.php
412 wget www.xx.de/formx1.php
414 wget www.xx.de/formx1.php
416 wget www.xx.de/formx2.php
421 wget www.xx.de/formm1.php
422 wget www.xx.de/forma1.php
425 wget www.xx.de/formx1.php
429 form1.php
430 wget www.xx.de/form1.php
437 wget www.xx.de/formma1.php
439 wget www.xx.de/formma1.zip
443 wget www.xx.de/frmular1.zip
444 wget www.xx.de/formular1.zip
524 wget www.xx.de/formular1.php
712 history | grep opt | grep rm
713 history | grep rm
-
Yezzz, I am root and the result of history | grep opt | grep rm is: 712 history | grep opt | grep rm
OK, than I do not know what wrecked your server exactly, but it sure is not nice. You mentioned phpadmin-multi shortly did you also update that one?
Are you using PuTTy (http://www.putty.org) to access the terminal from a client? If so that would be nice (as you can copy the screen output and post it here as well as copying commands to the terminal from the forums).
Perhaps we can try and install smeserver-oscommerce again, but we need to remove it first as it is still listed as installed, somehow:rpm -e --noscripts smeserver-oscommerce
Verify that it is no longer there:
rpm -q smeserver-oscommerce
That should output something like package smeserver-oscommerce not installed
If it was removed we can now try and reinstall the contrib:
yum install smeserver-oscommerce --enablerepo=smecontribs
It would be nice if you could copy the output to the screen in this thread to see if something strange is happening.
After installation do
signal-event post-upgrade
signal-event reboot
Login as root again and verify that - you have an oscommerce folder in /opt
- that the database is installed using the command listed in an earlier post
-
Amazing :grin: oscommerce is back again. Everything ran fine!
Thank you!!! But how do I log in into phpmyadmin? Do you want to open a new thread?
Best regards
AlexG
-
Amazing :grin: oscommerce is back again. Everything ran fine!
Thank you!!!
You're welcome. One word of advice: start making backups. :-)
But how do I log in into phpmyadmin? Do you want to open a new thread?
Please do so, but I guess we will have to use the same method as we did for smeserver-oscommerce.
-
Ok, I will try it on my own (remove and install again). - Is there an instruction for a Backup (I mean a full backup)?
Have a nice day.
Best regards
AlexG
-
Ok, I will try it on my own (remove and install again). - Is there an instruction for a Backup (I mean a full backup)?
Yes do a a search on keyword backup in the wiki (http://wiki.contribs.org/Special:Search?search=backup&go=Go).
-
This is a perfect example of why we have always said:
"Don't do stuff in pre/post scripts"
In the postuninstall script on smeserver-oscommerce you have this:
echo "Restarting Apache..."
/sbin/e-smith/expand-template etc/httpd/conf/httpd.conf
/usr/sbin/sv t httpd-e-smith
echo "Deleting MySQL user and DataBase..."
mysql -u root -e "DROP DATABASE oscommerce"
mysql -u root -e "REVOKE ALL PRIVILEGES ON oscommerce.* FROM 'oscommerce'@'localhost';"
mysql -u root -e "DROP USER oscommerce@localhost;"
/sbin/e-smith/config delete oscommerce
echo "Removing install directory..."
rm -rf /opt/oscommerce
Well during an upgrade from one version to another you call this script. So anytime you upgrade oscommerce you will wipe out your database and your directory.
-
Hi
Can you explain please 'Don't do stuff in pre/post scripts" please. I don't know exactly what I have done wrong. Thank you
So, I will go on now and remove and install phpmyadmin again and will write the result in a new thread.
Best regards
AlexG
-
Hi
Can you explain please 'Don't do stuff in pre/post scripts" please. I don't know exactly what I have done wrong. Thank you
So, I will go on now and remove and install phpmyadmin again and will write the result in a new thread.
You ca not do anything about it as this is something the developer(s) of RPMs should think about, the pre/post scripts are code scripts invoked on installing/removing a package.
For users who want to upgrade smeserver-oscommerce in the future the following advice:
Do not upgrade immediately from smecontribs using yum. First we will make a backup of the database:
mysqldump --opt oscommerce > /tmp/oscommerce.sql
We will also dump the entry from the configuration database:
db configuration get oscommerce > /tmp/oscommerce.cdb
After that we will also backup the /opt/oscommerce folder and the configuration template
tar cvzf /tmp/oscommerce.tgz /opt/oscommerce/* \
/etc/e-smith/templates/etc/httpd/conf/httpd.conf/98oscommerce \
/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/60redir-oscommerce \
/tmp/oscommerce.sql /tmp/oscommerce.cdb
First remove the installed RPM with the following command that will prevent the invocation of the pre/post installation scripts (and therefore will not remove the folder containing the files or the database:
rpm -e --noscripts smeserver-oscommerce
Now you can safely reinstall a new version as we have the backup available for recovering data later.