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:
- tiki-syslog.php only logged my admin login/logout.
- 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.
- I checked the database in PHPmyadmin, all tables result ok.
- 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.