docker icon indicating copy to clipboard operation
docker copied to clipboard

XSendFile error when specifying custom Thumbnail path

Open pengy39 opened this issue 3 years ago • 0 comments

Running FIlerun 20220202 with the following lines in the config:

$config['path']['trash'] = '/trash/';
$config['path']['thumbnail_cache'] = '/thumbnails/';
$config['system']['db']['utf8_names'] = true;
$config['system']['fm']['use_safe_move'] = true;

Attempting to retrieve some thumbnails results in the following log and a 404 on the client:

[Thu Feb 24 14:39:11.249432 2022] [:error] [pid 25] (20023)The given path was above the root path: [client 172.17.0.1:37440] xsendfile: unable to find file: /thumbnails/user-files/path/to/image.png, referer: https://filerunhostname/

This was fixed by disabling Apache XSendFile.

Is it possible to add an environment variable for additional directories to add to XSendFile's allowed list? https://github.com/filerun/docker/blob/master/Dockerfile#L91

pengy39 avatar Feb 24 '22 22:02 pengy39