Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

KCFinder 'You do not have permission to list the files.'

I have a problem with the integration of KCFinder in ckeditor. The version of my ckeditor is 4.0 and the other (KCFinder version) is 2.52-dev.

Hi configure the config.js of ckeditor like that:

CKEDITOR.config.baseHref = "/ckeditor/";

CKEDITOR.editorConfig = function( config ) {
    // Define changes to default configuration here.
    // For the complete reference:
    // http://docs.ckeditor.com/#!/api/CKEDITOR.config

    config.contentsCss  = 'contents.css';
    config.language= 'it';
    config.height = '400px';
    config.uiColor = '#ffDC6E';

    //kcfinder per l'uoload delle immagini
    config.filebrowserBrowseUrl = 'kcfinder-2.51/browse.php?type=files';
    config.filebrowserImageBrowseUrl = 'kcfinder-2.51/browse.php?type=images';
    config.filebrowserFlashBrowseUrl = 'kcfinder-2.51/browse.php?type=flash';
    config.filebrowserUploadUrl = '../../../reserved/kcfinder-2.51/upload.php?type=files';
    config.filebrowserImageUploadUrl = '../../../reserved/kcfinder-2.51/upload.php?type=images';
    config.filebrowserFlashUploadUrl = '../../../reserved/kcfinder-2.51/upload.php?type=flash';    

    // Remove some buttons, provided by the standard plugins, which we don't
    // need to have in the Standard(s) toolbar.
    config.removeButtons = 'Subscript,Superscript';
    config.disableNativeSpellChecker = false;
    };

The integration is of but when I click to "Show files in the server" or when I upload an image the system says "You do not have permission to list the files" though the permissions are correct.

What is the problem? Tks Salvo

like image 877
salvo italy Avatar asked Dec 07 '12 09:12

salvo italy


3 Answers

I think the problem is that you also need to configure the setting in KCFinder. You need to locate config.php in KCFinder folder, for this:

'disabled' => true

change it to false then you should be able to upload file to your server.

like image 80
user2376074 Avatar answered Oct 24 '22 07:10

user2376074


Is not the best way for secure raison, because to disable it inside config.php allow to all user to access it, the best way add the little code bellow inside the php file wich include your textarea :

$_SESSION['KCFINDER'] = array(
    'disabled' => false
);

Hopes that help.

like image 37
Rachid Benbrik Avatar answered Oct 24 '22 07:10

Rachid Benbrik


From the kcfinder website: By default KCFinder is disabled. If you just set this setting to false all public visitors can upload and manage files on your web site. It is recommended to override this setting with sesssion configuration so only authenticated users can use KCFinder.

like image 34
AndrewT Avatar answered Oct 24 '22 06:10

AndrewT