Loading...
 
Architecture / Installation

Architecture / Installation


Unable to upload/access files and pictures

posts: 31 France

Dear Community,

I'm currently running a v17 engine on a Virtual Private Server with Ubuntu LTS 17.04 / PHP 7 and am experiencing an issue when trying to attach files or insert pictures into an article. This is a feature I had never tried before, as we just injected text into the wiki to create a maintenance knowledge base.

Settings: tiki is configured to store files/pictures into a directory. I've selected a secondary disk which I subscribed with the VPS; the 2nd drive is mounted as /media/diskext and I created the following folders: /media/diskext/tw/galleries/ and /media/diskext/tw/attachments/ to host the files.

Uploading seems to go through, but when I try to read the uploaded file, I always get an error "Unable to access file: /media/diskext/tw/galleries/xxxxx".

I suspect a permission issue but don't know how to troubleshoot this. I have full root access to the VPS if needed.

Thanks in advance for any help!

posts: 2428 Czech Republic

Hi,
I would recommend creating symlinks one level up from your tiki root pointing to these (make sure you have FollowSymlinks enabled in your server Apache config) and using these.

HTH

luci


posts: 31 France

Hi Luciash,

Why would i.e. a "ln -s /media/diskext/tw /../datadir" change anything to access rights? Or maybe I wrongly suspect file permissions here...

Thanks for your help!

posts: 2428 Czech Republic

Sorry, my thinking was system root dir (/) and /media are not usually accessible paths by the web server but perhaps you set correct group perms for the tw/ subdirectory there...

Can you double check /media/diskext/tw/galleries/ is readable by www-data or apache or whatever group your system does use for the web server?

If you put a symlink in your tiki root and a file test.txt there you should be able to open it via your browser if it is...

luci


posts: 31 France

Hi Luciash,

Just tried to create a symlink with the same result:
- image seems to load (thumbnail is displayed, see attached picture)
- clicking on the fiel to open it returns error message "This image failed to load." in an empty box.

What could be wrong here?

Thanks for any help!


posts: 31 France

Could be a clue: created a test.txt file into the diskext/tw folder and a symlink to this file into the Tiki root. Trying to open the file with the browser pointing at wiki.mydomain.com/testfile returns "403: You do not have permission to access this document."...

How can I determine which user and group are used to run TW? I'm not really familiar with these...

Thanks in advance for any help!


posts: 31 France

Hi again,

I'm coming back to the forum as I couldn't fix my issue: images and files are still not accessible from within the wiki, and I even don't know where they're supposed to be stored.

The wiki is running from /var/www/vhosts/bcasmart.com/httpdocs/tw.
Data are (supposed to be) stored in /media/diskext/tw.

How can I query the system to find which user/group is authorized on the wiki folder? Maybe duplicating the same access rights to the data folder would solve the issue...

I've also checked that PHP is allowed to read/write into the data folder: I've updated the open_basedir variable to include the data folder path. Is this requested? Is this enough?

Wiki is still returning "File upload failed:" with no error code or message when trying to upload a file or a picture. Unfortunately, configuring wiki to store files into the database leads to the same result!

I'm feeling despaired and am missing the necessary system skills to understand how to troubleshoot...

Thanks in advance for any help!


Upcoming Events

1)  18 Apr 2024 14:00 GMT-0000
Tiki Roundtable Meeting
2)  16 May 2024 14:00 GMT-0000
Tiki Roundtable Meeting
3)  20 Jun 2024 14:00 GMT-0000
Tiki Roundtable Meeting
4)  18 Jul 2024 14:00 GMT-0000
Tiki Roundtable Meeting
5)  15 Aug 2024 14:00 GMT-0000
Tiki Roundtable Meeting
6)  19 Sep 2024 14:00 GMT-0000
Tiki Roundtable Meeting
7) 
Tiki birthday
8)  17 Oct 2024 14:00 GMT-0000
Tiki Roundtable Meeting
9)  21 Nov 2024 14:00 GMT-0000
Tiki Roundtable Meeting
10)  19 Dec 2024 14:00 GMT-0000
Tiki Roundtable Meeting