phplinuxfile-managerkcfinder

How to browse a server folder using a web file manager


I needed a web file manager able to navigate a given directory tree on a server. The best solution I could find was KCFinder available for free and considered reliable as long as I could read until now.

So I downloaded the last stable versione (3.12) and made a basic installation on my server.

I simply copied the whole kcfinder-3.12 folder in my wwwroot on a machine running Linux Debian+Apache+PHP5 then modified the kcfinder/conf/config.php so that any user was allowed to access:

  'disabled' => false

The default settings for folders remained as follows:

  'uploadURL' => "upload",
  'uploadDir' => "",

This should give me the right to browse, download and upload files located in the subfolder kcfinder/upload/

But when I run the application, it actually shows me only the subfolder "files/" contained in the above said upload folder despite many other exists created via shell.

I know this behaviour comes from the types settings:

  'types' => array(

    // (F)CKEditor types
        'files'   =>  "",
        'flash'   =>  "swf",
        'images'  =>  "*img",

    // TinyMCE types
        'file'    =>  "",
        'media'   =>  "swf flv avi mpg mpeg qt mov wmv asf rm",
        'image'   =>  "*img",
    ), 

enter image description here

But it's not very clear to me how those categories are supposed to fit in my expectations and how I'm instead allowed to have a web based file browser with no restrictions starting from a given directory.

Does anyone know what I'm doing wrong and if there's a way to get total access to a given directory? Here I talked about KCFinder but I'm available to listen any other option as long as it fulfills my request.


Solution

  • What you really need are two things:

    1) Enable DAV extensions on your web server. This consists simply of enabling the stock mod_dav module.

    2) Use any DAV-based file manager. Heck, there's one even for Android: https://play.google.com/store/apps/details?id=jp.ddo.shigadroid.webdavfilemanager&hl=en

    For native Linux, you don't need any special client software. A brief googling around suggests that current Gnome and KDE desktops can natively access remote files via the DAV protocol. Here's a random page Google came up with, with examples: http://doc.owncloud.org/server/6.0/user_manual/files/files.html

    I'm sure there are plenty of standalone DAV clients, that you can use to browse your web server via the DAV protocol, you can Google them up yourself.

    Of course, there are some issues to work out here, regarding configuration, security, and permissions. You need to set aside some time to dig through mod_dav's documentation, and figure out exactly how you need your security setup to work.