项目

一般

简介

开启"显示附件略缩图"后图片文件仍无法预览

0

Redmine Admin
大约 2 个月 之前增加

开启"显示附件略缩图"后图片文件仍无法预览,问题、新闻等模块的附件无法预览显示。无法显示预览图片文件,同时redmine日志发现无法生产.thumb预览文件。

App 26523 stderr: Command: 'convert' '/opt/redmine-3.4.4-3/apps/redmine/htdocs/files/2020/02/200214012708_admin.en.png'
-auto-orient -thumbnail '200x200>' '/opt/redmine-3.4.4-3/apps/redmine/htdocs/tmp/thumbnails/288_cabf2975c790cbbb9765dfc5b34babd78bbb2c733b3f1593c5d868b31179b2d0_200.thumb'
App 3976 stderr: Command: 'convert' '/opt/redmine-3.4.4-3/apps/redmine/htdocs/files/2020/02/200214013717_enable_private.en.png' -auto-orient -thumbnail '200x200>' '/opt/redmine-3.4.4-3/apps/redmine/htdocs/tmp/thumbnails/289_8571fc3536d6197ffae1692d50f3f1580d419b305251c4289aca3fae236aaa03_200.thumb'
App 3976 stderr: Completed 404 Not Found in 94ms (ActiveRecord: 13.2ms)
App 26523 stderr: Completed 404 Not Found in 140ms (ActiveRecord: 26.7ms)
App 26523 stderr: .convert.bin: unable to open image `/opt/redmine-3.4.4-3/apps/redmine/htdocs/tmp/thumbnails/290_d0692a750e698be53c287b3532a1bfd4981027f17b624706ba6d1e8318d63b73_200.thumb': Permission denied error/blob.c/OpenBlob/2701.
App 26523 stderr: .convert.bin: WriteBlob Failed `/opt/redmine-3.4.4-3/apps/redmine/htdocs/tmp/thumbnails/290_d0692a750e698be53c287b3532a1bfd4981027f17b624706ba6d1e8318d63b73_200.thumb'
error/png.c/MagickPNGErrorHandler/1646.
App 26523 stderr: Creating thumbnail failed (pid 27203 exit 1):
App 26523 stderr: Command: 'convert' '/opt/redmine-3.4.4-3/apps/redmine/htdocs/files/2020/02/200214013848_detail.en.png' -auto-orient -thumbnail '200x200>' '/opt/redmine-3.4.4-3/apps/redmine/htdocs/tmp/thumbnails/290_d0692a750e698be53c287b3532a1bfd4981027f17b624706ba6d1e8318d63b73_200.thumb'
App 26523 stderr: Completed 404 Not Found in 162ms (ActiveRecord: 13.7ms)

评论

解答 (1)

1

Redmine Admin
大约 2 个月 之前增加

经排查发现redmine的tmp目录下缓存类的相关子目录缺少写权限,尤其是thumbnails子目录缺少写权限是直接导致缩略图无法显示的直接原因。

为组用户添加写权限后问题解决,命令参考如下:

sudo chmod g+w ./thumbnails/ ./test/ ./sockets/ ./sessions/ ./pdf ./imports/ ./cache/
评论
    (1-1/1)

    你的解答

    文件
    (最大尺寸: 14.8 MB)