Koozali.org: home of the SME Server

In drupal 5.x, files upload to files folder, but I can't download them.

Offline yersin

  • 18
  • +0/-0
Hi everybody.

I'm facing this problem. In drupal 5.x, I can upload files normally, and I can see that they are in the files folder (inside html); however, I can't download them from their links or I can't see pictures I've added for users. For example, a file that I've uploaded has this link to be downloaded: /files/output.pdf, which should be fine. However, I get a 404 error page. I've tried in a virtual machine and an actual server.

I think that the problem is the way SME Server manages folders. The files are uploaded into the files folder inside html, but the link provided takes me to the files folder outside html, the one created by defaul in each ibay. If I manually copy the files into the files folder outside html, I can access the files and the pictures for users are shown normally. What can I do to avoid having to copy manually every single file that's uploaded?

Thanks for your answer.
« Last Edit: March 28, 2008, 10:09:54 AM by yersin »

Offline chris burnat

  • ****
  • 1,135
  • +2/-0
    • http://www.burnat.com
This post has been moved to the Sme7 section to the Contribs section of the forum.
- chris
If it does not work out of the box, please fill in a Bug Report @ Bugzilla (http://bugs.contribs.org)  - check: http://wiki.contribs.org/Bugzilla_Help .  Thanks.

Offline yersin

  • 18
  • +0/-0
Hi. Why to the contribs section?

Offline chris burnat

  • ****
  • 1,135
  • +2/-0
    • http://www.burnat.com
Hi. Why to the contribs section?

Off-topic in sme7 core section - Drupal is not installed with SME, hence falls into contribs.

- chris
If it does not work out of the box, please fill in a Bug Report @ Bugzilla (http://bugs.contribs.org)  - check: http://wiki.contribs.org/Bugzilla_Help .  Thanks.

Offline yersin

  • 18
  • +0/-0
First, I wasn't able to create a symbolic link. Being in root, I tried:

#ln -s ./html/files files

That created a link inside the existing folder (outside) targeting at the files folder inside html. It didn't solve the problem. It seems that I can't create a link named files if there's already a folder with that name. It looke like: root/files/files, and it can't be accessed. Then, I deleted the files folder 1 and the link just created, and I tried again:

#ln -s ./html/files files

Apparently it did it. It takes me to the folder inside html. However, when I try to download files, I get a "403 Forbidden error", although before I was able to access to files outside html. Besides, if I had just deleted the files folder outside html, (without making the link), I would've gotten the same error. Apparently, without the files folder outside html, files folder inside html is looked for.

Next, I created another folder inside html and named it "uploaded", and configured drupal to upload files into this folder. That did it. It seems that drupal got confused with files folder 1, because SME server by default takes root/files to the folder outside html. I hope I won't have more problems; otherwise, I'll come back.

Yersin.