module needs CMS v1.2, which means I cant delete the module! (solved)

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
rubberglover
Forum Members
Forum Members
Posts: 53
Joined: Mon Jul 23, 2007 5:30 pm

module needs CMS v1.2, which means I cant delete the module! (solved)

Post by rubberglover »

Hi,

I have installed the FrontEndUsers module (version 1.3.1) on CMSMS version 1.1.4.1. I can't upgrade CMSMS unfortunately as it's a heavily modified install with lots of customised pages; upgrading to a new version would mean a huge amount of work and the client isn't gonna pay for that!

So... the front end users module requires a version 1.2 of CMSMS. Problem is that the option to uninstall or change permissions on that module are not available; I'm just presented with a message saying "CMSMS v1.2 required". I can't upgrade the CMSM install for the reasons above, I can't delete the module folder via FTP as I used the module installer in the CMS and so write / exectute permissions are not available to the web server. It won't let me install an earlier version of the module until I've gotten rid of the existing one, and I can't do it!

Any one know how I can get rid of the module under these circumstances?!?
Last edited by rubberglover on Mon Feb 04, 2008 12:15 pm, edited 1 time in total.
nivekiam

Re: module needs CMS v1.2, which means I cant delete the module!

Post by nivekiam »

Write a little php script to change the permissions:

EDIT (fix typo):



That will set the permissions to 777 (world writtable for the FrontEndUsers directory and all files and directories below it.  Then simply delete the directory from your FTP client.  You will need to make double sure you have the full path correct.

I take no responsibility for any mistake you make.
Last edited by nivekiam on Tue Jan 29, 2008 6:12 am, edited 1 time in total.
rubberglover
Forum Members
Forum Members
Posts: 53
Joined: Mon Jul 23, 2007 5:30 pm

Re: module needs CMS v1.2, which means I cant delete the module!

Post by rubberglover »

Yay! You're a life saver... this worked a treat! Many thanks...

*NOTE* If anyone else is reading this and you are not too hot with PHP / coding etc, here's a little more detail on how to use the above script. If you're not sure of the path to your modules directory, here's a simple way to find out. Login to your CMSMS server via FTP and download the config.php file from the root. Open it up in a text editor and find the line that defines the root path variable... search for:

$config['root_path']

The root path is defined for this variable and will look something like this...

$config['root_path'] = "/your/root/path/will/be/here";

Most of you will end up with a path like so...  /home/www/yourdomainname/modules/FrontEndUsers

Now you just copy the script into a new php file and call it what you like... I called it permissions.php, and it contained the following code (with my domain name in it obviously!)



You then drop this PHP file onto your server via FTP. Once it's uploaded you just browse to it:

www.yourdomain.com/permissions.php

It will look like you've just browsed to an empty page but the above script will run in the background and change the permissions of the folder. Now you can go back to your FTP client and delete the folder. Woop woop!
Last edited by rubberglover on Mon Feb 04, 2008 12:17 pm, edited 1 time in total.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: module needs CMS v1.2, which means I cant delete the module! (solved)

Post by calguy1000 »

My question is..... why are you playing around on a live site?

You should be experimenting with a copy of the site.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
nivekiam

Re: module needs CMS v1.2, which means I cant delete the module! (solved)

Post by nivekiam »

very true calguy.

One more note though, you'll want to delete that permission changing script when you are not using it.  If anyone (this would most likely be someone malicious) happens to be guessing and hit that script or if you've accidentally linked to it on the web somewhere or even in email, then all it takes is someone, anyone, accessing the script and those permissions are changed.  Well so long as the webserver is the owner of those files.

And yes, I see all kinds of hits to my sites where malicious scripts, script kiddies, bots, etc have tried guessing URLs.  Just because you never link to it doesn't make it safe.  If it's on your website, anywhere on your website, even behind a password "protected" directory, it should ALWAYS be treated as public data.
rubberglover
Forum Members
Forum Members
Posts: 53
Joined: Mon Jul 23, 2007 5:30 pm

Re: module needs CMS v1.2, which means I cant delete the module! (solved)

Post by rubberglover »

True enough... in answer to the first response, I did actually do all my experimentation on a copy of the site, however it was only when I'd sorted everything and I went to add my changes to the live site that I realised that it was an older version of CMSMS and that the module I was using wasn't compatible! Doh!

Also, sage advice on being careful with the above script... you should only use it if absolutely necessary and delete it IMMEDIATELY after use... :)
Post Reply

Return to “CMSMS Core”