Advertisement:

Author Topic: attachment upload error and repair_settings issues  (Read 6004 times)

Offline Tonibee

  • Semi-Newbie
  • *
  • Posts: 11
attachment upload error and repair_settings issues
« on: April 30, 2013, 02:40:55 PM »
I've got issues I can't resolve and would really appreciate some help. I'm new... here, and to SMF.

I've been running my forum: www (dot) welfarerightsforums.com/wrf for a little over a year with no problems. I updated to v.2.0.4. a few months ago. I have checked that I'm fully up to date and I've run the internal checker/diagnostic tool and downloaded a backup. All is good. Aside from a couple of days updating and the initial set up I've never had to do anything. My forum isn't busy.

In the last two weeks I've encountered issues with the themes (which affected only me). The repair_settings.php tool was recommended but I didn't need it as I found an easy internal solution in these pages.

More recently, I've been unable to upload attachments, receiving the error message: Cannot access attachments upload path!. I only discovered this when existing links has stopped working and I decided to remove them and re-upload.

More research took me again to the page about the repair_settings.php tool (/community/index.php?topic=18096.0), so I decided to give it a go. However, when I uploaded it to the forum I received this error message: The package manager currently allows only these file types: zip, tgz, tar.gz.

I don't know what else to do. I've searched a few threads about each of my errors, but they're all different and, to be honest, I find talk of roots, strings, directories, paths, etc, etc scary and out of my league. I've looked at the directories in my website, but never touch them. I don't really know what I'm doing... But, I am experienced enough to be very sure that I have not made any accidental or 'meddling errors'.

Everything suggests that running the repair tool would be good. So what do I do next? Either about the repair tool upload or the attachment problem.

Thanks very much.

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 57,984
  • Gender: Male
    • Kindred-999 on GitHub
Re: attachment upload error and repair_settings issues
« Reply #1 on: April 30, 2013, 03:11:15 PM »
http://wiki.simplemachines.org/smf/What_is_repair_settings.php


however, in general, repair_settings.php is only really needed if the entire forum is unreachable because of corrupted or incorrect settings. You should be able to confirm the attachment path(s) in your smf admin
http://wiki.simplemachines.org/smf/Attachments_and_Avatars
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline Chalky

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,380
  • Gender: Female
  • If in doubt, give me beer...
    • ChalkCat
Re: attachment upload error and repair_settings issues
« Reply #2 on: April 30, 2013, 03:15:04 PM »
Hi Tonibee and welcome to the community  :)

Also repair_settings doesn't fix the path you don't need repair_settings to fix the path to the attachments directory.  You can check and correct this manually in Admin > Attachments and Avatars > Attachment Settings.

Sorry, cross-posted with Kindred  O:)

Edited - whoops!
« Last Edit: April 30, 2013, 03:32:59 PM by ChalkCat »

kat

  • Guest
Re: attachment upload error and repair_settings issues
« Reply #3 on: April 30, 2013, 05:05:49 PM »
when I uploaded it to the forum I received this error message:

For future reference, Repair_settings.php isn't a mod. You don't install it. You upload it to the root of your forum and navigate to the page, as the page that Kindred linked you to describes.

Offline Tonibee

  • Semi-Newbie
  • *
  • Posts: 11
Re: attachment upload error and repair_settings issues
« Reply #4 on: May 01, 2013, 02:40:02 AM »
Thanks everyone,

Sorry to be a bit thick over this.

In admin/.../attachment settings the attachments are at: /wrf/attachments

In my websites file directory, attachments are at: /wrf/attachments

They are the same. But I can't see any of my attachments in that folder or upload any new attachments. The file that are in the attachments folder don't seem to actually be my attachments - they open as gibberish and when I filter to display word documents there are none (but I have uploaded word docs).

I would settle for deleting all existing attachments from my forum and reposting them, but until I can at least upload new attachments that's not even an option.

I am bit of a thicko, I know (e.g. "upload to the root of your forum" means nothing to me...), so really grateful for any more assistance.

Thanks,

kat

  • Guest
Re: attachment upload error and repair_settings issues
« Reply #5 on: May 01, 2013, 05:51:23 AM »
They're gibberish, because they've been kinda encrypted. (Sort of, in an oblique kind of way)

If you have pictures, there, it can be demonstrated, to a degree.

If you download one and try to view it in Irfanview, it'll tell you that the files extension's wrong and ask if you want it changed. That only works with pictures, though. If you rename a file and change the extension to ".doc", it should load into Word, if it IS a .doc file.

The root of your forum, is the "Basic level", where everything starts, as it were. The root of your own computer, for example, is likely to be "C:\". Everything within that (The "Windows" directory, "Program files") are directories within that root. Basically, you can't go any further down, than the root. In the case of SMF, the root is where you'll find the file "Settings.php".

Offline Tonibee

  • Semi-Newbie
  • *
  • Posts: 11
Re: attachment upload error and repair_settings issues
« Reply #6 on: May 14, 2013, 06:36:20 PM »
I'm still having this problem and I really don't understand what I'm doing.

I'm usually pretty resourceful but I am defeated on this problem and this place is way over my head. I need an 'idiots guide'.

Any suggestions on a more appropriate forum or information resource most gratefully received.

Thanks very much those who tried to help. I just don't get it, I'm sorry.

kat

  • Guest
Re: attachment upload error and repair_settings issues
« Reply #7 on: May 15, 2013, 06:55:08 AM »
Let's try this, then...

Admin>Attachments and avatars>Attachments settings.

Can you copy/paste the path that appears in the box labelled "Attachments directory"?

Now, that shouldn't be an absolute path, like http://www.yourforum.com/avatars.

It should be something more like:

/home/forum/public_html/attachments

Offline Tonibee

  • Semi-Newbie
  • *
  • Posts: 11
Re: attachment upload error and repair_settings issues
« Reply #8 on: May 15, 2013, 06:31:57 PM »
Yes:

/hermes/bosweb/web222/b2225/ipg.welfarerightsforumsc/wrf/attachments


Thanks for trying again,

Offline Storman™

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 2,027
Re: attachment upload error and repair_settings issues
« Reply #9 on: May 16, 2013, 04:17:00 AM »
Quote
/hermes/bosweb/web222/b2225/ipg.welfarerightsforumsc/wrf/attachments

Is that letter "c" suppossed to be there ?

/hermes/bosweb/web222/b2225/ipg.welfarerightsforumsc/wrf/attachments

It may well be correct but just checking....
Any Backup method is bettter than no Backup method....

kat

  • Guest
Re: attachment upload error and repair_settings issues
« Reply #10 on: May 16, 2013, 05:57:50 AM »
Hmmm... I'd expect "home" to be there, at the start. ******, they bury things in a lot of sub-directories, your host, don't they?

That "c" looks highly suss, too, as Storybookman pointed out.

Offline Tonibee

  • Semi-Newbie
  • *
  • Posts: 11
Re: attachment upload error and repair_settings issues
« Reply #11 on: May 16, 2013, 06:47:24 PM »
Yes, the 'C' is definitely supposed to be there.

But the heading attachments directory is highlighted in red... I don't think I noticed that earlier - being away for a couple of weeks has cleared my head of the annoyance feeling, which wasn't helping.

I've tried other links from my forum (to pages & documents on my website, and external links) and they are working, so the problem is confined to attachments.

In the file manager of my website the directory visible to me is 'root/wrf/etc.' (plus my other pages in place of WRF of course), so I can't see any of the first part of the path. I guess that's internal server stuff - other websites and things. As for the length of it? well it's the first one I've seen so I'll just take your word for it :-)

What next?

Thanks very much for your patience - I'm getting on whenever I can.

Offline Colin

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 7,864
  • Gender: Male
  • SMF Developer
    • colinschoen on GitHub
Re: attachment upload error and repair_settings issues
« Reply #12 on: May 16, 2013, 07:52:16 PM »
Welcome to SMF!

I am sorry to hear about the issues you are having. You are with iPage right?
"If everybody is thinking alike, then somebody is not thinking." - Gen. George S. Patton Jr.

Colin

Offline Tonibee

  • Semi-Newbie
  • *
  • Posts: 11
Re: attachment upload error and repair_settings issues
« Reply #13 on: May 17, 2013, 02:00:57 AM »
Thank you Colin. Yes, I'm with ipage.

Offline Colin

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 7,864
  • Gender: Male
  • SMF Developer
    • colinschoen on GitHub
Re: attachment upload error and repair_settings issues
« Reply #14 on: May 17, 2013, 02:26:14 AM »
Check the file permissions of the folder and make sure you have full CHOWN ownership. If you still don't have any luck you can shoot me a private message with temporary iPage and SMF login details and I will be more than happy to take a look.
"If everybody is thinking alike, then somebody is not thinking." - Gen. George S. Patton Jr.

Colin

Offline Tonibee

  • Semi-Newbie
  • *
  • Posts: 11
Re: attachment upload error and repair_settings issues
« Reply #15 on: May 17, 2013, 04:36:27 AM »
Quote
Check the file permissions of the folder and make sure you have full CHOWN ownership"

Which folder? What is 'CHOWN' and how do I make sure I have ownership of it?

Cheers!

kat

  • Guest
Re: attachment upload error and repair_settings issues
« Reply #16 on: May 17, 2013, 06:13:57 AM »
CHOWN is something you'll need to demand from your host. You need full CHOWN ownership of the files on your site.

If they refuse, dump 'em. ;)

More about CHOWN, here:

http://unixhelp.ed.ac.uk/CGI/man-cgi?chown

It's a server-level command that overrides the usual CHMOD stuff that you probably already know about. :)

Offline Tonibee

  • Semi-Newbie
  • *
  • Posts: 11
Re: attachment upload error and repair_settings issues
« Reply #17 on: May 17, 2013, 07:11:19 AM »
Quote
It's a server-level command that overrides the usual CHMOD stuff that you probably already know about

Gobbledygook




That annoyance feeling is back - idiots guide still needed...

MrPhil

  • Guest
Re: attachment upload error and repair_settings issues
« Reply #18 on: May 17, 2013, 09:22:39 AM »
Permissions (set by chmod) come in groups of 3: owner, group, others. Each can have a different set of privileges with a directory (folder) or file. chown says who the owner is (and can set the group, too). Ownership/group membership is most often messed up by a misconfigured FTP that assigns the wrong ownership to a directory or file when it's uploaded. You'll have to work with your host to find out the best way to list ownership and permissions on your site and see if you own everything you should and that the permissions are OK (generally 755 for directories and 644 for files: read-write for owner, read-only for everyone else). Depending on how your server is set up, you may need to extend write permission for a particular directory or file to the group (775/664) or even (!!) everyone (777/666). You might want to read my sig > FAQs > Proper Permissions, to get more information. Only your host can fix incorrect ownership (run chown).

K@ -- chown does not override anything. It sets who the owner and group are, which in turn says which number (set of permissions) in chmod applies to whom.

repair_settings.php is a PHP tool, not a package or attachment. Read the instructions link given earlier.

Attachments are not encrypted -- the original content is still there. However, to prevent collisions between like-named files, or people trying to directly read (steal) a file in your attachments directory, the names are "hashed" (a one-way encryption) to something unique and unguessable, while the original name is stored in the database. Without poking through the database, you can't find the original name of the file. You can, by trial and error, find out what an attachment is by copying it to a known name, and trying different file extensions (.doc, .jpg, etc.) on it. As mentioned before, some image display utilities can figure out the correct extension for various image files, but they'll be helpless with a .doc file.

kat

  • Guest
Re: attachment upload error and repair_settings issues
« Reply #19 on: May 17, 2013, 09:24:58 AM »
CHMOD is a *nix command, that Linux uses. A lot of servers are run on Linux, coz they don't have to pay Microsoft ******loads of cash. :)

CHMOD stands for "CHange MODe". In simple English, it's "File permissions". :)

The thing, with this, is that you can set the file permissions (CHMOD) as much as you like. You can look at yours and think "Hmm. Everything's fully read-write-enabled. How come it's not working?"

The reason, is that the permissions that your host sets (CHOWN-"CHange OWNership") might be making those permissions different to what you perceive.

So, you could be saying "Make this file read/write-enabled for everybody" and your host's settings, which override yours, could be saying "The Hell you will. This file is read/write protected and it's gonna stay that way, whatever you girly settings say!!"

(Bugger. All that typing for nothing) :(

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 70,794
    • StoryBB/StoryBB on GitHub
Re: attachment upload error and repair_settings issues
« Reply #20 on: May 17, 2013, 09:26:40 AM »
That said, correct ownership can have effects *beyond* read/write permissions. suExec in particular... the owner of the file is who the script will run as, so a script owned by the FTP user will execute as the FTP user, which is of course problematic if something is owned by www-data/nobody/apache...

And also, K@'s right, there are times when hosts can override whatever chmod has set.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline Tonibee

  • Semi-Newbie
  • *
  • Posts: 11
Re: attachment upload error and repair_settings issues
« Reply #21 on: May 17, 2013, 12:52:22 PM »
Thanks all,

I'm an accomplished I.T. user but when it comes to the inner workings I'm sooo out of my depth. Maybe I should go on a course...

Ipage says it has good support, so I suppose now is the time to find out. I'll give them the link to this thread and hope they understand. I'll report back and let you know what they say.

Are there any theories why this has happend out of the blue? In the OP I mentioned that the problem first occurred (or at least I first knew about it) after the last SMF update package. Noone has fingered that as a culprit; is it worth a second thought?

I really do appreciate you folks giving me your time. Thank you.

ps. Mr Phil: I have read the instructions for the repair tool several times, but I got stuck on the uploading part (still can't do it). But in any case, the consensus seems to be that it's not relevant to my problem and I really don't want to do anything that's not actually necessary.

kat

  • Guest
Re: attachment upload error and repair_settings issues
« Reply #22 on: May 17, 2013, 04:02:31 PM »
In case you need it, later, you can upload it using FTP. Or, at a pinch, your site's CPanel has a File Manager **Shudder**.

To use some handy acronyms, if FTP makes you go "WTF?", have a look at this:

http://wiki.simplemachines.org/smf/FTP_-_How_do_I_use_FTP

Offline Tonibee

  • Semi-Newbie
  • *
  • Posts: 11
Re: attachment upload error and repair_settings issues
« Reply #23 on: May 18, 2013, 07:39:53 PM »
ipage support weren't any help at all. Three times they asked me provide them with information to replicate the problem. I told them twice that I didn't know any more than posted in this thread and then I gave up...

I'm going to keep looking.

Offline Colin

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 7,864
  • Gender: Male
  • SMF Developer
    • colinschoen on GitHub
Re: attachment upload error and repair_settings issues
« Reply #24 on: May 19, 2013, 05:09:20 AM »
I know this may sound silly, but you might want to try calling/emailing/live-chatting once more and hope that you get someone who actually wants to help you. This stuff is a piece of cake for them to do. They just have to actually do their job.
"If everybody is thinking alike, then somebody is not thinking." - Gen. George S. Patton Jr.

Colin

Offline Tonibee

  • Semi-Newbie
  • *
  • Posts: 11
Re: attachment upload error and repair_settings issues
« Reply #25 on: May 19, 2013, 07:53:57 AM »
I fixed it! :-)

I was rooting around in my servers CPanel and found a document location path that was similiar to the attchments directory path I posted earlier.

I made the latter match the former and that has entirely fixed the problem! I can now access and upload attachments to my forum.

Ipage should easily have seen that if they'd read this thread, surely?

I'd surmise the problem arose because ipage changed their directories at the lower levels or the forum attachment directory path was corrupted somehow when I last updated SMF.

Anyway, I want to thank everyone who posted to this thread. It has helped my understanding and given me the confidence to go change something I wouldn't normally dream of doing (I did make a detailed note so I could undo it first though). I also found out that my next task is to understand more about backups...

 :)

Offline naimnatnod

  • Newbie
  • *
  • Posts: 6
Re: attachment upload error and repair_settings issues
« Reply #26 on: August 09, 2013, 05:12:59 PM »
I got the exact same problem.  I also have iPage.com as my web hosting.  They are not too bad if you know what you're doing.

You can find your Document Root here:

iPage -> Log In
Control Panel -> Server Information (under Additional Tools section)

You will find your Root in there.

Took me a while!


Offline TKG26

  • Semi-Newbie
  • *
  • Posts: 80
Re: attachment upload error and repair_settings issues
« Reply #27 on: October 16, 2013, 05:33:56 PM »
thanks to this thread i fixed my attachment issue as well.

Having just switched over to hostgator everything transfered over well. Had to reset my theme, but today noticed i could not upload attachments. It had the old path from the old host found in:
Admin>Attachments and avatars>Attachments settings
As suggested earlier in this post...

Now if i may ask a semi related question? Again i think its relating to my resent change of host...

When i click on "update your forum" Under admin> Update available...

The url takes me here:
"http://www.rcottawa.com/forum/index.php?action=admin;area=packages;pgdownload;auto;package=http://custom.simplemachines.org/mods/downloads/smf_patch_2.0.3.tar.gz;cfdcd556e2e=e47ed0058d6ab2e5e3ae0885b3e58707"

Wich results in a ERROR 403 - FORBIDDEN

Any ideas?

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 57,984
  • Gender: Male
    • Kindred-999 on GitHub
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.