1

I have Tiki 15.4 running on a shared host - I have a problem with the file galleries feature: Uploading stuff to the file galleries works well, for instance I uploaded a .webm video and then it's listed by the wiki interface as present in the gallery. However I cannot not download or do anyhting else with this or any other files later on.

I get an “unable to acces file” error for all my file galleries when trying to download. I can reproduce this for all new uploads.

How can I diagnose what’s happening? I tried these things:

  1. tiki-syslog.php only logged my admin login/logout.
  2. I activated recording and showing for all file archives/file events and generated an action report. Here it shows that I downloaded files, but nothing about errors/failures.
  3. I checked the database in PHPmyadmin, all tables result ok.

EDIT:

  1. I also enabled debug mode, the php messages I'm getting seem to be non-critical, i.e. they shouldn't hint at something that impairs functionality.

EDIT 2: There may be a problem with permissions to access the folder where the files should be saved. Tiki has two options for file galleries: they can be saved either in a web directory or in the database. At setup, I chose to save them in a directory. Tiki documentation says, this directory should not be directly accessible. This can be accomplished in two ways:

  • Use a directory outside your webserver document root, make sure your php script can read and write to that directory
  • Use a directory inside the document root and use .htaccess to prevent the user from listing the directory contents

The folder I specified is inside the DocumentRoot (I think), i.e. it is under Tiki's root directory: tiki-15.4/files, so I believe PHP should have permission to read/write there. I made no changes to the permissions, and I'm not sure if I even can (or how) on this shared host.

Current permissions are:

e42604@web06:~$ ls -ld html/apps/tiki-15.4/files
drwxr-xr-x 4 e42604 e42604 4096 Jan 21  2017 html/apps/tiki-15.4/files

e42604 is my ssh user. I don't know if it's identical to the web server user, but I guess it should be, yes?

These are the permissions on the web root:

e42604@web06:~$ ls -ld      
drwxr-x--- 13 e42604 www-data 4096 Jan  3 21:09 .

I checked the folder I specified to upload all files to (tiki-15.4/files) through FTP, and it did not contain the files I had uploaded, although they were all listed as being there in the wiki interface.

However, when I choose to store file galleries in the database, it works: I can upload stuff and download it again.

I could just go with this as a solution, but I'd prefer finding out how to store the files in a web folder.

  • Btw I already posted this issue in Tiki forums, got 40 views but no replies in several days. – Ben Opp Dec 28 '17 at 23:57
  • Are you saying you can view the uploaded files at any time, but not download them? That would be truly strange, since viewing and downloading are effectively the same thing. – barrycarter Dec 29 '17 at 14:04
  • No, viewing doesn't work either. Just uploading. The only time I was able to view a file was that video directly after uploading. I'm guessing it is a preview? The screen did not change after that. – Ben Opp Dec 29 '17 at 16:13
  • Can you ssh into the shared host and run commands like locate or find to see where your files might be going? I suspect a simple path error somewhere. – barrycarter Dec 29 '17 at 16:14
  • I just tried it again: The video preview actually works before pressing the upload button, so it must be previewing the local copy. Also, this didn't work with an .mp4 file. A second .webm did work. – Ben Opp Dec 29 '17 at 16:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.