Latest News: (loading..)
Sign in to follow this  
Followers 0
geoffreywalton

Checking File Permissions

72 posts in this topic

Hi there,

 

I have added this contrib but it doesn't seem to be working when i navigate to the link through tools in admin, i just get a 404 not found FILENAME_CHECK_PERMISSIONS was not found on this server.

 

If i navigate to check_permissions.php through a web browser it works.

 

Anyone have any ideas? :)

Share this post


Link to post
Share on other sites

Hi there,

 

I have added this contrib but it doesn't seem to be working when i navigate to the link through tools in admin, i just get a 404 not found FILENAME_CHECK_PERMISSIONS was not found on this server.

 

If i navigate to check_permissions.php through a web browser it works.

 

Anyone have any ideas? :)

 

You missed out one of the installation steps.

 

HTH

 

G

Share this post


Link to post
Share on other sites

I used this to change all my folders to 755 and my files to 644. I didn't notice for a few hours I had a "warning: able to write to the config file" at the top of the store so hopefully everything is all good. I changed it to 0444. My question is, what other files do not need to be writeable and need to be changed from 644 to 444?

Share this post


Link to post
Share on other sites

This is the only one that I know of.

 

Cheers

 

G

Share this post


Link to post
Share on other sites

Hello, I followed the readme provided with the download and for some reason when I click the check permissions button in the admin I get an error saying the page requested can not be found do you know what I can do to fix this or if I did something wrong

 

Thanks

 

Adamanto

Share this post


Link to post
Share on other sites

wow nice share

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

_________________________________________________________________________________________________________________________________________________________________________________________

 

lab bahasa, laboraotrium bahasa in http://www.parchain.co.id

Share this post


Link to post
Share on other sites

I get an error saying the page requested can not be found

 

This normally means you have not followed all of the installation steps.

 

If you post the whole message I could tell you more.

 

G

Share this post


Link to post
Share on other sites

I'm trying to install this add-on and am running into a problem. I uploaded all the files like the instructions in the zip say, but on step 3 it says:

 

3. Add this line to admin/includes/boxes/tools.php

 

'<a href="' . tep_href_link(FILENAME_CHECK_PERMISSIONS) . '" class="menuBoxContentLink">' . BOX_TOOLS_CHECK_PERMISSIONS . '</a><br>' .

 

after

 

BOX_TOOLS_NEWSLETTER_MANAGER . '</a><br>' .

 

When I go to that file and open it up to add the above line, this is what it looks like:

 

<?php
/*
 $Id$

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2010 osCommerce

 Released under the GNU General Public License
*/

 $cl_box_groups[] = array(
   'heading' => BOX_HEADING_TOOLS,
   'apps' => array(
     array(
       'code' => FILENAME_ACTION_RECORDER,
       'title' => BOX_TOOLS_ACTION_RECORDER,
       'link' => tep_href_link(FILENAME_ACTION_RECORDER)
     ),
     array(
       'code' => FILENAME_BACKUP,
       'title' => BOX_TOOLS_BACKUP,
       'link' => tep_href_link(FILENAME_BACKUP)
     ),
     array(
       'code' => FILENAME_BANNER_MANAGER,
       'title' => BOX_TOOLS_BANNER_MANAGER,
       'link' => tep_href_link(FILENAME_BANNER_MANAGER)
     ),
     array(
       'code' => FILENAME_CACHE,
       'title' => BOX_TOOLS_CACHE,
       'link' => tep_href_link(FILENAME_CACHE)
     ),
     array(
       'code' => FILENAME_DEFINE_LANGUAGE,
       'title' => BOX_TOOLS_DEFINE_LANGUAGE,
       'link' => tep_href_link(FILENAME_DEFINE_LANGUAGE)
     ),
     array(
       'code' => FILENAME_MAIL,
       'title' => BOX_TOOLS_MAIL,
       'link' => tep_href_link(FILENAME_MAIL)
     ),
     array(
       'code' => FILENAME_NEWSLETTERS,
       'title' => BOX_TOOLS_NEWSLETTER_MANAGER,
       'link' => tep_href_link(FILENAME_NEWSLETTERS)
     ),
     array(
       'code' => FILENAME_SEC_DIR_PERMISSIONS,
       'title' => BOX_TOOLS_SEC_DIR_PERMISSIONS,
       'link' => tep_href_link(FILENAME_SEC_DIR_PERMISSIONS)
     ),
     array(
       'code' => FILENAME_SERVER_INFO,
       'title' => BOX_TOOLS_SERVER_INFO,
       'link' => tep_href_link(FILENAME_SERVER_INFO)
     ),
     array(
       'code' => FILENAME_VERSION_CHECK,
       'title' => BOX_TOOLS_VERSION_CHECK,
       'link' => tep_href_link(FILENAME_VERSION_CHECK)
     ),
     array(
       'code' => FILENAME_WHOS_ONLINE,
       'title' => BOX_TOOLS_WHOS_ONLINE,
       'link' => tep_href_link(FILENAME_WHOS_ONLINE)
     )
   )
 );
?>

 

Where am I supposed to add this line?

Share this post


Link to post
Share on other sites

I'm having the same problem! I do not have the line BOX_TOOLS_NEWSLETTER_MANAGER . '</a><br>' in my tools.php file. Running 2.3.1

Edited by biggeorge

Share this post


Link to post
Share on other sites

config's set to 644 can allow you to view the sites db password by directly loading the config file:

www.sitepath.com/store/includes/configure.php

file --> save as --> .txt gives you the full config file.

I'd HIGHLY recommend using 400...

 

i am still trying to piece my site back together after a massive hack and will more than likely have to start from scratch.

 

Please safeguard your config files!!!!

Share this post


Link to post
Share on other sites

Same problem here, looks like the code has likely changed in 2.3.1 ? Don't know php well enough to know how to tweak it, played around a bit but nothing shows up in the admin section...

 

Any thoughts?

 

I'm having the same problem! I do not have the line BOX_TOOLS_NEWSLETTER_MANAGER . '</a><br>' in my tools.php file. Running 2.3.1

Share this post


Link to post
Share on other sites

Hi all and thanks Geoffrey for a great contribution.

 

My question:-

How can I change the default permissions which appear just before I click on update?

 

Details:-

When I add a new product, the images are uploaded with a 777 permission.

There might be an easier way to change these permissions but about once a week, I just use this addon and update

image permissions to 644. To my annoyance, I have to change ALL the default permissions to my desired permission

EVERYTIME.

 

Also, It's been mentioned in the previous page or two that some of the suggested permissions are strange.

This problem can be eliminated if the contribution user can change the default permissions themselves

to their desired settings.

 

Thanks.

Share this post


Link to post
Share on other sites

You can set the permissions you want to test against on the first screen, the advice on permission levels may have changed since I last amended this or alternatively I might just be prompting with the wrong value.

 

Just change it to the one you want.

 

G

 

Hi Geoffrey,

I have a crontab set up to execute admin/sitemonitor.php but after I update my php files to 644, I get a message (execute) "permission denied". When I change this file to 700, it works. My problem here is that after I update my permissions in the administration panel, I need to go to my hosting control panel everytime to change my admin/sitemonitor.php permission setting.

I guess the only solution to this is to individualize the admin/sitemonitor.php permission like you have done to configure.php and IPtrap.php???

Edited by CutieCute2

Share this post


Link to post
Share on other sites

To change the default permissions that appear in the boxes can be done very easily by editing /admin/check_permissions.php.

 

Because different hosts have different requirements I can't please all of the people all of the time.

 

Just nip in there and change it to your requirments.

 

Adding in a new file that needs a special/different level can be done by duplicating the code for one of the other files that need specified permissions.

 

HTH

 

G

Share this post


Link to post
Share on other sites

Same problem here, looks like the code has likely changed in 2.3.1 ? Don't know php well enough to know how to tweak it, played around a bit but nothing shows up in the admin section...

 

Any thoughts?

 

This was written for 2.2 and not 2.3.1.

 

For those of you running IP Trap, AVS (Anti-Virus System) and Site Monitor check this does not break them.

 

If things ever quieten down I'll look at adding code to cater specifically for them.

 

Cheers

 

G

Edited by geoffreywalton

Share this post


Link to post
Share on other sites

(EDITED) As I posted the solution to my own question from yesterday and asked my next question, you posted both solutions. Thanks Geoffrey Walton!!!

Edited by CutieCute2

Share this post


Link to post
Share on other sites

Just nip in there and change it to your requirments.

 

Adding in a new file that needs a special/different level can be done by duplicating the code for one of the other files that need specified permissions.

 

HTH

 

G

I've made some progress creating a special entry for sitemonitor.

I've tried twice, once duplicating the IP_trap (15) and once duplicating the sitemap (16) info to sitemonitor (17), and both times the sitemonitor appears on the first page but after I click on "check" or "update", nothing happens. The default permission is 700, but the check shows 644 OK.

Thanks.

Share this post


Link to post
Share on other sites

So, in order to have the site_monitor.php file set to 777, I need to duplicate another entry such as the one for IP_trap.php

 

I have duplicated info at lines:

175

483

591-595

Share this post


Link to post
Share on other sites

Hi Geoffrey and other "permissions checker" fans. You must all be busy?

 

My problem isn't a big one so I'm still hoping to solve it.

 

To reiterate my problem and question.......

When I upload new products, the uploaded images have a 777 permission instead of 644.

The option of updating all permissions with Geoffrey's Permission Checker seems better than changing the permissions of each new image, however,

I require a 700 permission for my sitemonitor.php file so I have to change that manually.

 

I have tried to create an individual checker thingy for sitemonitor.php by changing sitemap to sitemonitor.

It all appears and looks good but doesn't change the permissions.

Could someone please tell me the lines I need to change?

Share this post


Link to post
Share on other sites

Back monitoring this as the "follow" disppeared with the forum upgrade.

Share this post


Link to post
Share on other sites

1. Will this work in 2.3.1? the tools.php file looks different

 

array(

'code' => FILENAME_NEWSLETTERS,

'title' => BOX_TOOLS_NEWSLETTER_MANAGER,

'link' => tep_href_link(FILENAME_NEWSLETTERS)

),

 

2. Will this work for Windows/IIS?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0