I have two png images and an html document (an archived e-newsletter) in a "files" folder in an offline drupal installation, but when I try to go where each of them are located I get a "page not found" error. Can someone explain to me why and how I can fix this? The installation is an attempt to update my site kindchoices.org to Drupal 6.8.

Comments

vm’s picture

I have two png images and an html document (an archived e-newsletter) in a "files" folder in an offline drupal installation

Not sure drupal will let you at them when the site is offline, if the files folder is drupals.

Are you logged in as admin while trying to get do this?

Try putting the site online and see if you can reach them?
If not?

which file system is being used? public or private?
how are you trying to access the files? directly? through a node?

vegagitator’s picture

I tried it just now with the site online, still nothing. I am logged in as admin while doing this. I am using a public download method. I changed the file system path from "files" to "sites/default/files" and changed it back again. I'm wondering if that messed things up.

I tried to access the files directly at their URLs. My theme (zen-classic) also attempts to retrieve my custom logo from the path I gave for it (according to an inspection by firebug), but it doesn't appear.

vegagitator’s picture

I deleted the "files" and "tmp" folders, reset sites/default/settings.php to the original default file, started the install over again from there with the same database and ran update.php. Then I had it create the files and tmp folders for me and I put the files in. Now the logo works, but I still can't get to the other files directly.

vegagitator’s picture

I started all over again with a new installation of Drupal 6.8 and the same database. Now it all works. Weird. I still wonder what happened.

vegagitator’s picture

I am having this problem again with a different site in a multisite installation. I do not want to delete and reinstall all of the core files to fix this again. Can someone please explain what is causing this problem?

vm’s picture

There really isn't enough debug information here to try and narrow it down. It's not a problem I've seen before your post. If the issue was widespread there would be many comments here or other forums posts. I can't find any.

rickoshay’s picture

I am currently using Hostgator and am operating under these shell commands for my file and folder permissions:

find . -type d -exec chmod u=rwx,g=rx,o=rx {} \; - that's 755
find . -type f -exec chmod u=rw,g=r,o=r {} \; - that's 644

I have enabled the file module and am attempting to access uploaded files through a direct browser request (i.e: http://myhost[dot]com/sites/default/files/picture1.jpg).

So far all I come up with is a "File Not Found" page.

For testing purposes I FTP'd into my site and put a .jpg file in the files directory and tried accessing it. Still no luck.

I noticed there is an .htaccess file in the folder. It's content is:
SetHandler Drupal_Security_Do_Not_Remove_See_SA_2006_006
Options None
Options +FollowSymLinks

Perhaps, between the permissions, the .htaccess and the web hosting company there is something that can be done. For now, I will continue to test and try to come up with a solution. Any help would be appreciated.

rickoshay’s picture

Came across this documentation here: http://drupal.org/node/176828

"However, your server configuration may not allow SetHandler directives or even Options directives in .htaccess files, so you may need to edit the .htaccess file, remove those lines, and then write-protect the file."

nano the .htaccess document and commented out those lines. Cleared the cache data and still no luck.

The battle continues...

rickoshay’s picture

http://drupal.org/node/701994 (images stopped showing | htaccess, symlinks, FollowSymLinks, SymLinksIfOwnerMatch)

http://drupal.org/node/702106 (Symlinks has been disabled on Hostmonster and it seems like no decent Drupal website can be hosted with them any longer)

http://www.listware.net/201010/drupal-support/22753-support-problems-wit...

http://drupal.org/node/656022 (Use clean address without "FollowSymLink")

rickoshay’s picture

After a couple of hours work on this issue I started an online chat with Hostgator. I have to mention that every time I have done this the staff has not only been very helpful but also pleasant. I recommend Hostgator for anyone out there looking for a quality web hosting company.

But I digress...it turns out that it was not an .htaccess problem but a permissions problem. My "files" folder was set to 544 and it should have been set to 755.

They changed it for me and voila images showing just fine!