Sometimes the CKFinder ASP.NET connector may not work properly. This can be caused by invalid configuration, insufficient permissions, missing dependencies etc. In such cases the connector will send a response that by default contains only general information about the error.
The error may occur at different stages:
Generic error messages are used because they do not reveal any potentially harmful information (like server paths) that could be misused by hackers with hostile intent.
Depending on the situation, the generic error message may be insufficient for a developer configuring CKFinder to understand the exact error that has happened and why it occurred. This article explains how to recover from this situation.
When CKFinder is launched and configured to use a folder which does not exist and CKFinder does not have sufficient write permissions to create it, it will return a generic error message:
Folder not found. Please refresh and try again.
Because the error occurs at a very early stage during the application startup, the application will not load. Without having access to the file system CKFinder cannot actually display any files, so all that the users will see is the generic error message.
CKFinder is configured correctly, files are correctly listed in CKFinder and the user can view files.
When the user tries to rename a file, but file permissions do not allow this, CKFinder will display a generic error message:
It was not possible to complete the request due to file system permission restrictions.
CKFinder is configured correctly, files are correctly listed in CKFinder and the user can view files.
When the user tries to upload a file, but file permissions do not allow this (e.g. when SELinux blocks it or because folder permissions are set to 0755
and the owner of the target folder is different than the user under which the web server process runs), CKFinder will display a generic error message:
It was not possible to complete the request due to file system permission restrictions.
By default log files are created in the /ckfinder/App_Data/logs
directory.
For debugging purposes, please make sure you have enabled verbose logging with the enableVerboseLogging
option. See Connector Configuration.
The default logger adapter uses the NLog library. The logger configuration file is named NLog.config
, and contains a few configuration options that you may find useful. For more information about its structure see the official NLog Wiki on GitHub.