♥geoffreywalton Posted August 6, 2008 Share Posted August 6, 2008 (edited) Do you want to check the file and directory permissions on your server match those specified in the post installation instructions in the knowledgebase? You can run this feature in 2 modes. Check and Update. One shows what would be done if the permissions, which you can set on the screen, are applied and the other shows the changes actually made. It is possible that your server will throw 500 "Internal Server Error" if you set the permissions to values they do not like. As you get a display of all the changes made, make sure you test your site before you leave the results page. (You can set everything back.) Sometimes you can get this when you upload files for a contribution. Being paranoid, I recommend you back up you site content to your pc using an ftp client before playing around with permissions. Also it would be good if you know how to change permissions from your ISP's control panel and using an ftp client such as filezilla. Now available from http://addons.oscommerce.com/info/6134 Edited August 6, 2008 by geoffreywalton Quote Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile 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 ======>>>>>. Link to comment Share on other sites More sharing options...
azer Posted August 11, 2008 Share Posted August 11, 2008 it seems to be a terrific tool , it can save hours !!! let me thank you :-) im gonna test it now for the chmod , how to know for sure the official chmod required and advised ? by the way don't forget to look at this contribtuion who has the same goal http://www.oscommerce.com/community/contributions,2137 it s more graphic but go less deeper ! Quote MS2 Link to comment Share on other sites More sharing options...
markg-uk Posted August 12, 2008 Share Posted August 12, 2008 Looks a good contribution. Might be useful to have a filter in there somewhere to not show files that have the correct permissions (for people who have lots of files) Quote Link to comment Share on other sites More sharing options...
Guest Posted December 18, 2008 Share Posted December 18, 2008 Hi, I have a couple of problems with the contribution and wondered if anyone could help? Firstly before the file checking starts I get this line: Set Standard File And Directory Permissions **Permission check in progress (no changes will be made).** The directory backups exists, so this is OK. The admin directory is called shop Type Name Original permissions Actions / Results Warning: chdir() [function.chdir]: No such file or directory (errno 2) in /homepages/nn/dnnnnnnnnn/htdocs/shop/admin/check_permissions.php on line 360 File ./account.php 755 Action Required, should be File ./stylesheet.css 755 Action Required, should be Directory ./images 755 Action Required, should be File ./account_edit.php 755 Action Required, should be Then runs OK for a while until this: File ./images/default/Thumbs.db 755 Action Required, should be File ./images/banners/oscommerce.gif 755 Action Required, should be File ./images/banners/Thumbs.db 755 Action Required, should be 1146 - Table 'dbnnnnnnnnn.TABLE_COUNTER' doesn't exist select startdate, counter from TABLE_COUNTER Now table COUNTER doesn't exist, table counter (lower case does) So I added the table but still received the error? Any help much appreciated. Quote Link to comment Share on other sites More sharing options...
♥geoffreywalton Posted December 18, 2008 Author Share Posted December 18, 2008 What version of osc are you using? G Quote Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile 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 ======>>>>>. Link to comment Share on other sites More sharing options...
♥geoffreywalton Posted December 18, 2008 Author Share Posted December 18, 2008 That line is looking for an entry for TABLE_COUNTER in /includes/database_tables.php. The only place it is called is from the standard footer in the shop, in the rc2a version, not the admin area, so am a little confused as to why it is being called from a php file the admin area. Have you copied the shop footer.php to /admin? Quote Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile 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 ======>>>>>. Link to comment Share on other sites More sharing options...
Guest Posted December 28, 2008 Share Posted December 28, 2008 i am getting the same thing with my install of MNK Edition based off osCommerce 2.2 rc2a this mod is pre installed with the MNK version thanks Jeff Hi, I have a couple of problems with the contribution and wondered if anyone could help? Firstly before the file checking starts I get this line: Set Standard File And Directory Permissions **Permission check in progress (no changes will be made).** The directory backups exists, so this is OK. The admin directory is called shop Type Name Original permissions Actions / Results Warning: chdir() [function.chdir]: No such file or directory (errno 2) in /homepages/nn/dnnnnnnnnn/htdocs/shop/admin/check_permissions.php on line 360 File ./account.php 755 Action Required, should be File ./stylesheet.css 755 Action Required, should be Directory ./images 755 Action Required, should be File ./account_edit.php 755 Action Required, should be Then runs OK for a while until this: File ./images/default/Thumbs.db 755 Action Required, should be File ./images/banners/oscommerce.gif 755 Action Required, should be File ./images/banners/Thumbs.db 755 Action Required, should be 1146 - Table 'dbnnnnnnnnn.TABLE_COUNTER' doesn't exist select startdate, counter from TABLE_COUNTER Now table COUNTER doesn't exist, table counter (lower case does) So I added the table but still received the error? Any help much appreciated. [/quote Quote Link to comment Share on other sites More sharing options...
Guest Posted December 28, 2008 Share Posted December 28, 2008 (edited) i copyed the footer.php to admin and it helped the top message is now gone Warning: chdir() [function.chdir]: No such file or directory (errno 2) in /homepages/nn/dnnnnnnnnn/htdocs/shop/admin/check_permissions.php on line 360 the only thing that was different was the url address i copyed he message to make the post quick this one is still their 1146 - Table 'projedd1_mnkosc.TABLE_COUNTER' doesn't exist select startdate, counter from TABLE_COUNTER [TEP STOP] this is at bottom of the page after u click on the check permissions Edited December 28, 2008 by projectpb Quote Link to comment Share on other sites More sharing options...
♥geoffreywalton Posted December 28, 2008 Author Share Posted December 28, 2008 The admin/includes/footer.php should be as follows <?php /* $Id: footer.php,v 1.12 2003/02/17 16:54:12 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ ?> <br> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td align="center" class="smallText"> <?php /* The following copyright announcement is in compliance to section 2c of the GNU General Public License, and thus can not be removed, or can only be modified appropriately. For more information please read the osCommerce Copyright Policy at: http://www.oscommerce.com/about/copyright Please leave this comment intact together with the following copyright announcement. */ ?> E-Commerce Engine Copyright © 2005 <a href="http://www.oscommerce.com" target="_blank">osCommerce</a><br> osCommerce provides no warranty and is redistributable under the <a href="http://www.fsf.org/licenses/gpl.txt" target="_blank">GNU General Public License</a> </td> </tr> <tr> <td><?php echo tep_image(DIR_WS_IMAGES . 'pixel_trans.gif', '', '1', '5'); ?></td> </tr> <tr> <td align="center" class="smallText">Powered by <a href="http://www.oscommerce.com" target="_blank">osCommerce</a></td> </tr> </table> If you copy the footer from the shop you will get the error because the counter table is not defined in database_tables.php. Either put the correct footer back or define it in the tables file. Might be a good idea to contact your template provider and point out their error. Quote Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile 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 ======>>>>>. Link to comment Share on other sites More sharing options...
Guest Posted January 4, 2009 Share Posted January 4, 2009 Apologies for the late reply due to Xmas and New Year. By the way Happy New Year! I checked and footer.php in the admin area is exactly the same as it is in your example. I too am using a template (never again!) so perhaps there is something in there that is causing the problem? I am still getting: 1146 - Table 'db266941211.TABLE_COUNTER' doesn't exist select startdate, counter from TABLE_COUNTER [TEP STOP] Anythink else that needs to be checked? Quote Link to comment Share on other sites More sharing options...
♥geoffreywalton Posted January 4, 2009 Author Share Posted January 4, 2009 No, somewhere you have a reference to a table that is not listed as a files that the admin area can access (see file in admin/includes). The offending code is probably require(DIR_WS_INCLUDES . 'counter.php'); which refers to the script /includes/counter.php G Quote Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile 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 ======>>>>>. Link to comment Share on other sites More sharing options...
Dhalgren Posted February 5, 2009 Share Posted February 5, 2009 Same exact problem as the others. I copied your footer.php to Admin and nothing changed. Sure wish i could use this add-on. Quote Link to comment Share on other sites More sharing options...
♥geoffreywalton Posted February 5, 2009 Author Share Posted February 5, 2009 Should be to /admin/includes/footer.php Try changing line 541 of check_permissions.php from.... <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> to <?php //require(DIR_WS_INCLUDES . 'footer.php'); ?> Quote Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile 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 ======>>>>>. Link to comment Share on other sites More sharing options...
lightshine Posted February 6, 2009 Share Posted February 6, 2009 (edited) Hi Geoffrey Walton, Do you have an additional configuration file which allow files or folders to be added from the Admin panel onto the Check File Permissions mod, instead of modify from the php file? Thanks! Edited February 6, 2009 by lightshine Quote Link to comment Share on other sites More sharing options...
Dhalgren Posted February 6, 2009 Share Posted February 6, 2009 Hey!! That seems to have worked. No errors so far. Thank you! Quote Link to comment Share on other sites More sharing options...
♥geoffreywalton Posted February 7, 2009 Author Share Posted February 7, 2009 Hi Geoffrey Walton, Do you have an additional configuration file which allow files or folders to be added from the Admin panel onto the Check File Permissions mod, instead of modify from the php file? Thanks! no, which files and folders are missing? G Quote Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile 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 ======>>>>>. Link to comment Share on other sites More sharing options...
hlee Posted February 10, 2009 Share Posted February 10, 2009 I would lilke to say thank you to Geoffrey Walton for the contribution which is very useful. Very clear instruction, easy to follow. Now can control file and folder permission easily and safe a lot of time. Once again thanks Geoffrey for the good work. GOD Bless you. Quote Link to comment Share on other sites More sharing options...
lightshine Posted February 10, 2009 Share Posted February 10, 2009 no, which files and folders are missing? G Nothing is missing but if we need to add in our own files and folders, the admin panel setting side for the check permission would be useful. We wouldn't want to mess around with the php file for the contribution, hope you understood what i meant. Just my 2 cents worth of thoughts and thanks for the great contribution! Quote Link to comment Share on other sites More sharing options...
Guest Posted February 28, 2009 Share Posted February 28, 2009 Hi. This is a great, and easy to run/install, contribution. I put it in a rc2a system and had one minor problem: Warning: chmod() [function.chmod]: Operation not permitted in /home/jwewbro1/public_html/admin/check_permissions.php on line 326 if (!$testrun) { if(substr($current_file,-3,3) == 'bak'){ unlink($path); } else { switch ($correct_mod) { case 777: $ch = chmod($current_file, 0777); break; case 755: $ch = chmod($current_file, 0755); break; case 744: $ch = chmod($current_file, 0744); break; case 644: THIS IS LINE 326 $ch = chmod($current_file, 0644); break; case 444: $ch = chmod($current_file, 0444); break; case 440: $ch = chmod($current_file, 0440); break; case 400: $ch = chmod($current_file, 0400); break; default: $ch = chmod($current_file, 0644); } // if ($ch ){echo '<br>ok '.$current_file; }else{echo '<br>ohoh '.$current_file;} } } echo "<tr> <td>File</td> <td>" . $current_file . "</td> <td>" . decoct($mode) . "</td> <td>" . ((decoct($mode)==$correct_mod) ? "OK" : (($testrun) ? "Action Required, should be " . $correct_mod : ($ch ? "Updated to " . $correct_mod : "Update failed"))) . "</td> </tr>"; } // if if_dir if ($i > 5000) { break; } It looks like everything worked. I ran a check with the same 644/755 values and it checked out. Also, on CPANEL. Is there a way to eliminate the error message? Let me know. Once again, great mod! Quote Link to comment Share on other sites More sharing options...
♥geoffreywalton Posted February 28, 2009 Author Share Posted February 28, 2009 For some reason your configuration on the server is not letting you change the permissions on a file to 644. Have a look at the directory permissions the file is in and the file permissions. Glad you found it of use. G Quote Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile 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 ======>>>>>. Link to comment Share on other sites More sharing options...
Guest Posted February 28, 2009 Share Posted February 28, 2009 For some reason your configuration on the server is not letting you change the permissions on a file to 644. Have a look at the directory permissions the file is in and the file permissions. Glad you found it of use. G Thanks, I'll dig around in there. Quote Link to comment Share on other sites More sharing options...
Terediye Posted March 1, 2009 Share Posted March 1, 2009 Found a bit missing as well... look in the admin\check_permissions.php file for: $backup = $_POST['backup']; $temp = $_POST['temp']; and put in the middle line to make it: $backup = $_POST['backup']; $download = $_POST['download']; $temp = $_POST['temp']; Which should make it so that running this doesn't kill your downloads folder anymore. Noticed that it couldn't set the permissions on the file partway through. Quote Link to comment Share on other sites More sharing options...
AndreD Posted March 4, 2009 Share Posted March 4, 2009 Warning: chmod() [function.chmod]: Operation not permitted in /home/jwewbro1/public_html/admin/check_permissions.php on line 326 same problem - did you find a solution to it ? Quote Link to comment Share on other sites More sharing options...
♥geoffreywalton Posted March 4, 2009 Author Share Posted March 4, 2009 What are the current permissions on the file? Do you have permissions sufficient to change the permissions? Quote Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile 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 ======>>>>>. Link to comment Share on other sites More sharing options...
AndreD Posted March 5, 2009 Share Posted March 5, 2009 >>What are the current permissions on the file? the php file itself got even 777 for testing purposes. >>Do you have permissions sufficient to change the permissions? well, using FTP, sure, but I am not sure how to verify if the PHP engine is allowed to use chmod , may that be the issue ? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.