News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Taking Mods out Manually

Started by lacin64, October 14, 2013, 09:53:10 PM

Previous topic - Next topic

lacin64

Forum version: SMF 2.0.2/Current SMF version: SMF 2.0.2

Is it possible to take the Mods out of a forum without uninstalling them? Take them out line by line if necessary as long as I'm not going to do too much damage, too much damage as in damage I wont be able to fix.

Most of the Mods loaded have the proper file permission chmod755 in packages folder where this error plays everytime I try to uninstall something,
"You cannot download or install new packages because the Packages directory or one of the files in it are not writable!".
There are few Modifications that will not change their chmod664 file permissions no matter what I do or so it would seem.

Any help or advice would be appreciated, I'm relatively new to code but I'm trying to learn. Thanks

Kindred

yes. You can manually parse the mod install and then manually apply the changes in reverse.

However, your chmod issues are probably related to the temp directory in Packages or the fact that your host has misconfigured php and has chown settings screwed up for ownership of php created files.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

lacin64

This was the error I meant to post to start with (sorry, I just found it)
The "delme.tmp" file in the quotations below is missing.
Quote
The following files need to made writable to continue installation:
/home/mysite/public_html/Packages/temp/delme.tmp

Could this be the major factor why we're having this issue with install/uninstall?

If it was the server settings though, can it be reconfigured for PHP file ownership to be sorted out? and where might I look:

Lastly: The WinRAR files in the /Packages/backups can be deleted right?

Thanks in advance.

Kindred

Yes, in general, you can delete the stuff in "backups" - especially if you have your own, full site backup.

I don't know about that file...   it sounds like something specific to whatever mod you are trying to uninstall.

As for the ownership stuff...   if depends on how the server is set up.
Some hosts have php running as "nobody", which means that stuff installed by php script, like the package manager get assigned as a "nobody" user instead of the logged in user, or even apache.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

lacin64

Just out of interest, does that include the individual file backups I've seen in some of the Templates, with the ~ after the name ( Index.php~ ) can these be deleted, or do they play a part somewhere on the forum, or is it that they may play a part/.

Storman™

When a file is amended by a mod, those files with a ~ are essentially created as a backup of that file. So in effect yes you could delete them but only if you are certain that all amended files have had any amendments corrected.

Suggest you simply backup up all the files before you manually make the changes (just in case). Alternatively you could simply just ignore the ones with a ~ against them...   ;)

lacin64

After reading just a handful of post's here on SMF I was turned into a Backup freak, so now I'm an avid saver of the forums Databases and any individual files I think may need deleting are saved to a folder on my PC before making any changes ;).
Does the  Backup Database save the backup files~ btw or do I need to carry on backing up individual folders and files as and when?
(I'm thinking as and when)

The main reason I asked about backup files~ was that I noticed some of there File Permissions were chmod644 so I thought to change or delete these seemingly unnecessary files such as the backups~, but still keeping them safe to upload again if I had to.
I noticed on a few of these files with 644 file permissions I couldn't change the 644 to 755 through the FPT (fileZilla), hence my reason for wanting to delete in the first place :-\

Some files do change via edit but most will not.

Kindred

644 is the correct chmod for files.

755 is for directories.

the php~ files are backups of the file prior to installing the last mod to edit that file
They are good resources in case a mod craps the system, because you can go, delete the bad file, rename the php~ file and recove the system (usually)


Buit deleting them or not will have no effect on installing or uninstalling mods.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

MrPhil

1. Backup Database would back up only the database, not any files.
2. This is the SMF Backup Database? You shouldn't use it, if possible. It has many known problems. Use phpMyAdmin's Export instead.
3. Note that by default, many servers will allow random people on the web to read .php~ files. Probably no harm in most cases (except if you have a Settings.php~ or Settings_bak.php~), but many people like to add an .htaccess clause to deny access to .php~ files, or else remove the files from the server.
4. Many servers don't allow FTP clients to chmod (change permissions). They will silently ignore requests to make changes. You'll have to use your hosting control panel (file manager).
5. Why would you want to chmod a file from 644 (normal file permissions) to 755 (normal directory permissions)?

lacin64

Ahh OK. Thank you, so it's 644 for normal "files" and 755 for normal "directory" permissions.
I took this error to mean that all of the files inside the directory had to be made writable, I just thought I could modify the files via the FTP to solve the problem.
Quote"You cannot download or install new packages because the Packages directory or one of the files in it are not writable!"

I realize now it's more complicated to chmod than I first thought, so I'll go look at the host's control panel and take it from there.

Many thanks for your time gents, I really appreciate the information provided.

MrPhil

What is "writable" (by PHP... it doesn't care what's writable by you) depends on how your server is configured. It might be 755/644, 775/664, or (hopefully not) 777/666. You just have to try them in that order until you hit the one that works. The Packages directory should already exist, but you might need to modify its permissions. The temp directory under Packages may have to be created.

lacin64

Thanks again, I know more than I did yesterday and that's got to be a good thing.

Regards:

Advertisement: