Loading...
 
Features / Usability

Features / Usability


Re: Re: Can't Upload Word or Excel Files in File Gallery

posts: 1563 Germany

Hello artsegura,

to store files in the directory, it is necessary that the directory has the right permissions applied, for that the application can read and write to the directory.

In a standart shared hosting environment this permission is 777.

If the directory does not have the right permission applied, you will get a "can't upload file" error.

Using the directory files inside the tikiroot is unsecure and not recommended, as the files would be accessible via the domain. But to just test at the first place you should check and test, if changed permissions (server side) would solve the problem.

For production I strongly recommend to us a directory "besides" the tikiroot. As I do not know your directory structure I cannot (yet) clearly show you, but I try to explain with an example:

A ) Domain / Tikiroot


Your domain points to the tikiroot which is usually named "tiki-13.1" if you use FTP upload and you did not rename it after unzipping (if we use Tiki 13.1).

B ) A "container" for the Tiki project.


We create a directory "myproject" and inside this we unzip / install a previously downloaded Tiki 13.1, for that the tikiroot is here:

myproject/tiki-13.1

Then we find directories like:

Copy to clipboard
myproject/tiki-13.1/admin myproject/tiki-13.1/db myproject/tiki-13.1/files myproject/tiki-13.1/lib etc.


As said, the domain should be set to point to myproject/tiki-13.1

C ) files directories


We create the files directory structure inside the container "myproject" besides the tikiroot, which is named tiki-13.1 in this example.

Then you manually create a new directory structure in "myproject" like following:

Copy to clipboard
myproject/files myproject/files/batch myproject/files/filegallery myproject/files/wiki myproject/files/podcasts etc.

 

D ) Files directories' permissions


Now set permissions 777 for the folder myproject/files and all subfolders (including 644 for files).
Using a shell (SSH shell / Linux shell) this would be:

Copy to clipboard
$: cd /path/to/myproject $: chmod -R 777 files $:


In a standart shared hosting environment without SSH access you can do the same with the webbased control center. There must be some kind of "file manager".

E ) Set the path in the app


We login to the Tiki application and go to /tiki-admin.php?page=fgal

There we set the path as following:

Copy to clipboard
../files/filegallery


For the wiki, the podcasts, the batch upload etc. this applies analog; just change the folder at the end of the path.

The two dot mean one level up:

../ goes up from myproject/tiki-13.1 to myproject

from there down to myproject/files/filegallery



So given, you have set the directory permissions right and the path aswell, you should be able to upload files to the directory and they will be stored "outside the tikiroot" and thus not accessible from the web via the domain.

There are cases, where this is not possible and where is no choice than using the /files directory inside the tikiroot. Then you can secure the directory with an index.php file, which you can find an copy for example from the folder /db .

I hope that helps.

Best regards,
Torsten

There are no comments at this time.

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