Security issue with admin directory
#161
Posted 27 December 2010, 15:57
define('DIR_WS_ADMIN', '/renamed_admin_directory/');
define('DIR_FS_ADMIN', '/your/path/to/directory/renamed_admin_directory
========================
I did the above procedure and it works but I got this error message when I go to
the Admin page then Tools\DataBaseBackUp
then I see this error messages " :Error Error: Backup directory does not exist. Please set this in configure.php. "
Does someone needs how to fix this, thanks
#162
Posted 27 December 2010, 16:05
http://forums.oscommerce.com/topic/368985-error-error-backup-directory-does-not-exist-please-set-this-in-configurephp/page__pid__1554542#entry1554542
Virus Threat Scanner
My Contributions
Basic install answers.
Click here for Contributions / Add Ons.
UK your site.
Site Move.
Basic design info.
For links mentioned in old answers that are no longer here follow this link Useful Threads.
If this post was useful, click the Like This button over there ======>>>>>.
#163
Posted 27 December 2010, 23:53
#164
Posted 28 December 2010, 00:05
A link on how to sort out a hacked site is on my about me page in my profile.
Not really difficult just time consuming and detailed.
HTH
G
Edited by geoffreywalton, 28 December 2010, 00:06.
Virus Threat Scanner
My Contributions
Basic install answers.
Click here for Contributions / Add Ons.
UK your site.
Site Move.
Basic design info.
For links mentioned in old answers that are no longer here follow this link Useful Threads.
If this post was useful, click the Like This button over there ======>>>>>.
#165
Posted 09 January 2011, 22:17
How do you do this? I have no idea. I have followed most of the steps in "securing" my website, and I have seen this one posted in each one, but I have no idea how to go about this, can somebody help? I'm using HostGator, if that matters or helps...
Thanks,
Andrew
#166
Posted 09 January 2011, 23:33
qkzoo, on 09 January 2011, 22:17, said:
How do you do this? I have no idea. I have followed most of the steps in "securing" my website, and I have seen this one posted in each one, but I have no idea how to go about this, can somebody help? I'm using HostGator, if that matters or helps...
Thanks,
Andrew
#168
Posted 10 January 2011, 20:36
qkzoo, on 10 January 2011, 12:45, said:
More info on >>htaccess
#169
Posted 11 January 2011, 00:52
Andy
#170
Posted 11 January 2011, 06:49
Quote
Ignoring the suggestions on "How to secure your osCommerce" thread will not protect your site from injection attacks, xss, file_manager point of entry, etc.
#171
Posted 11 January 2011, 13:23
BryceJr, on 11 January 2011, 06:49, said:
Ignoring the suggestions on "How to secure your osCommerce" thread will not protect your site from injection attacks, xss, file_manager point of entry, etc.
I'm sorry, I dropped the wrong link somehow. The link I meant to show was a bunch of .htaccess codes for protecting a site, and I can't find the link now. I have followed those instructions to the best of my ability, I have added Security Pro, I have gone through and made sure that all of my files are 644 or lower (permissions), folders 755 or lower, my configuration.php file(s) have a permission setting of 400, I believe. I renamed the admin directory, and I have protected the "Admin" directory with .htaccess by means of my hosts cpanel directory password protect function. According to the post, i should delete the admin/file_manager.php file (which didn't exist in my installation) and the file admin/define_language.php, which I did. The only thing I think I have left to do is the link titled "You can stop cross site scripting attacks with Anti XSS."
There was also a link to install software to block specific ip's, but my site isn't even active yet, so I can wait on that...right?
I want to make sure this thing is tight as I can possibly make it, so can you think of anything I left out?
Thank you,
Andy
#172
Posted 16 January 2011, 01:29
Now I am entirely locked out. I get the lovely "500 Internal Server Error" message. I had been modding my code via the file manager because my .htaccess file does not show up in Filzilla for me. I have tried FTPing the file for .htaccess and .htpasswd back up into my site but to no avail. And my entire site is now offline. Advice anyone? Thank you in advance
This is my .htaccess code:
# $Id: .htaccess 1739 2007-12-20 00:52:16Z hpdl $
#
# This is used with Apache WebServers
#
# For this to work, you must include the parameter 'Options' to
# the AllowOverride configuration
#
# Example:
#
# <Directory "/usr/local/apache/htdocs">
# AllowOverride Options
# </Directory>
#
# 'All' with also work. (This configuration is in the
# apache/conf/httpd.conf file)
# The following makes adjustments to the SSL protocol for Internet
# Explorer browsers
#<IfModule mod_setenvif.c>
# <IfDefine SSL>
# SetEnvIf User-Agent ".*MSIE.*" \
# nokeepalive ssl-unclean-shutdown \
# downgrade-1.0 force-response-1.0
# </IfDefine>
#</IfModule>
# If Search Engine Friendly URLs do not work, try enabling the
# following Apache configuration parameter
# AcceptPathInfo On
# Fix certain PHP values
# (commented out by default to prevent errors occuring on certain
# servers)
# php_value session.use_trans_sid 0
# php_value register_globals 1
<Files ~ "^\.ht">
Order allow,deny
Deny from all
Satisfy All
</Files>
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{QUERY_STRING} base64_encode.*\(.*\) [OR]
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
RewriteCond %{QUERY_STRING} (\<|%3C).*iframe.*(\>|%3E) [NC,OR]
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
RewriteRule ^(.*)$ index_error.php [F,L]
RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
RewriteRule .* - [F]
AuthName "Restricted Area"
AuthType Basic
AuthUserFile /hyperactive3d.com/lookywhatifound/.htpasswd.txt/.htpasswd
AuthGroupFile /dev/null
<Files home>
require valid-user
</Files>
EDIT: Sorry didn't copy all the code.
Edited by puerdemon, 16 January 2011, 01:32.
#173
Posted 16 January 2011, 01:58
#174
Posted 07 February 2011, 00:43
Then, you MUST change the references to that folder name in the following file:
/admin (has new name now)/configure.php
if you make the changes to that file, then the system can find the login page. if you don't make the changes to that file, the system cannot find the login page nor the error page.
rgmonster, on 21 July 2009, 15:29, said:
Not Found
The requested URL /admin/login.php was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
--------------------------------------------------------------------------------
Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 mod_perl/2.0.4 Perl/v5.8.8 Server at www.myshop.co.uk Port 443
Please, for novices like me who are trying to learn oscommerce, don't assume it's just this or that and it's done. I am finding lack of concise answers to anything regarding oscommerce and putting notices like this without a troubleshooting guide is not helpfull at all.
#175
Posted 14 February 2011, 20:01
If I set up different passwords, the one in .htaccess seems to override the other and locks me out of admin.
I thought I would be able to set up one password in htaccess which would be different than the one set up during installation.
Am I missing something?
#176
Posted 17 February 2011, 13:32
I don't use the tell a friend feature.
It appears when /tell_a_friend.php is called directly the user is redirected to: /product_info.php?products_id=0 where an access denied message is displayed.
Providing a valid product id: /tell_a_friend.php?action=process&products_id=[Product_id#] as a guest user can bypass the restriction and send unsolicited mails from the system.
Is it safe to remove /tell_a_friend.php without breaking anything?
#177
Posted 20 February 2011, 15:20
HTH
G
Virus Threat Scanner
My Contributions
Basic install answers.
Click here for Contributions / Add Ons.
UK your site.
Site Move.
Basic design info.
For links mentioned in old answers that are no longer here follow this link Useful Threads.
If this post was useful, click the Like This button over there ======>>>>>.
#178
Posted 17 March 2011, 03:39
the issue is when you are making a copy of admin directory or rename your admin directory the directory permissions change, depends on your domain provider.
What you have to do is temporary set the permissions a to either 777 or something for admin/include/configure.php file. Once the configure admin name is changed to new directory name you are good to go.
hopefully this is helpful.
Oh don't forget to change the permission on configure back.
Thanks
Hamsaya
#179
Posted 13 April 2011, 22:06
As a recap, here is just one of the attempted scenarios:
1.) I had the "admin" folder working fine. I could login and browse the back office; no problems...
2.) I changed the folder name on the server side from "admin" to "mynewname"
3.) I changed the folder name on my local side from "admin" to "mynewname"
4.) I modified the configure.php found in "mynewname/includes/" directory on my local side to be:
define('DIR_WS_ADMIN', '/mynewname/'); //and as according to Jan's instructions. This step seemed a bit weird as the original syntax for the first define line reads : "define('DIR_WS_ADMIN', 'catalog/mynewname/');"
define('DIR_FS_ADMIN', '/your/path/to/directory/mynewname/');
5.) I uploaded the changes to the server
6.) Cleared my cache
7.) Attempted to login to back office at url: https://shopname.domain.com/catalog/mynewname/
I can get to the first login window but 500 Internal Server Error on second login window...
Any help??
Thanks
Edited by Sohgave, 13 April 2011, 22:10.
Shawn
"Surface the ship! Prepare to muster all personnel to escape hatches.
Break out the rafts. Lash them to the deck.
We'll use them as shelters until the fleet arrives."
#180
Posted 21 April 2011, 15:49
Can you show us by steps on how to change the config.php file from 444 or to 604? Thanks.
-Emily














