QuickLook permission denied I've never try to fix it but my quicklook doesn't work on some file like .c, .java, .json ect.. I think it begin (about 2 or 3 months ago) when I tried to install plugin for quicklook find on this page https://github.com/sindresorhus/quick-look-plugins .

I tried to fix it using the multiple solution I found on the internet like run qlmanage -r, qlmanage -r cache, deleting the .qlgenerator files but nothing work.

Then I found we can run qlmanage in debug, I did it and I found that I've got a permission problem, here is what I get when I run qlmanage -p test.java :

Testing Quick Look preview with files:
    test.java
go4it:9: permission denied: /usr/local/opt/highlight/bin
go4it:9: permission denied: /usr/local/opt/highlight/bin
2018-04-28 12:42:23.426 qlmanage[1527:35098] QLColorCode: colorize.sh failed with exit code 101.  Command was ('/Users/yohannmbp/Library/QuickLook/QLColorCode.qlgenerator/Contents/Resources/colorize.sh' '/Users/yohannmbp/Library/QuickLook/QLColorCode.qlgenerator/Contents/Resources' '/Users/yohannmbp/Desktop/test.java' 0).
go4it:5: permission denied: /usr/local/opt/highlight/bin
go4it:5: permission denied: /usr/local/opt/highlight/bin
2018-04-28 12:42:23.466 qlmanage[1527:35098] QLColorCode: colorize.sh failed with exit code 101.  Command was ('/Users/yohannmbp/Library/QuickLook/QLColorCode.qlgenerator/Contents/Resources/colorize.sh' '/Users/yohannmbp/Library/QuickLook/QLColorCode.qlgenerator/Contents/Resources' '/Users/yohannmbp/Desktop/test.java' 1).
2018-04-28 12:42:23.497 qlmanage[1527:35098] *** CFMessagePort: bootstrap_register(): failed 1100 (0x44c) 'Permission denied', port = 0xae0b, name = 'com.apple.coredrag'
See /usr/include/servers/bootstrap_defs.h for the error codes.
2018-04-28 12:42:23.549 qlmanage[1527:35098] *** CFMessagePort: bootstrap_register(): failed 1100 (0x44c) 'Permission denied', port = 0x7f23, name = 'com.apple.tsm.portname'
See /usr/include/servers/bootstrap_defs.h for the error codes.


And here is the quicklook I got :


And there is the exact same permission error on other kind of file.
Any idea how I could fix it ?

EDIT : I tried to remove all plugin and when there isn't the QLColorCode plugin I can QL the .java file but without color.

My configuration :


macOS High Sierra 10.13.4
MacBook Pro 2016 Touch Bar
It's not clear whether this is a recent change in behaviour, or whether you've had this issue for a while. However, QLColorCode hasn't been updated in a long time and my understanding is that it's started to show signs of its age in recent times, with issues such as conflicting with other QuickLook plugins. 

For example, with QLColorCode installed the QLStephen.qlgenerator is not showing text for various text files (instead just showing the typical preview info).

However, some additional things that may be worth trying include:


moving the plugin to a new location, rebooting your MBP, moving the plugin back again, and then rebooting again (or use the qlmanage -r command)
uninstalling the plugin (by dragging it into trash), rebooting, reinstalling it from scratch, rebooting again (or use the qlmanage -r command)
boot your MBP into Safe Mode and then exit by restarting normally
trying the qlmanage -r cache command multiple times


If none of the above suggestions work, then you could try this alternative instead: QLColorCode-extra.

Note: I am not affiliated in any way with QLColorCode-extra.