News:

Wondering if this will always be free?  See why free is better.

Main Menu

attachment upload error and repair_settings issues

Started by Tonibee, April 30, 2013, 02:40:55 PM

Previous topic - Next topic

Tonibee

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 [nofollow] 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.

Kindred

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
Сл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."

Chalky

#2
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!

kat

Quote from: Tonibee on April 30, 2013, 02:40:55 PMwhen 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.

Tonibee

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

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".

Tonibee

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

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

Tonibee

Yes:

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


Thanks for trying again,

Storman™

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....

kat

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.

Tonibee

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.

Colin

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

Tonibee


Colin

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

Tonibee

QuoteCheck 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

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. :)

Tonibee

QuoteIt'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

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

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) :(

Advertisement: