Twig cache working for Apache but not for lighttpd

Recently I’ve been trying to run Grav on lighttpd on OSX, but turns out the file permissions work for Apache but not for lighttpd. Even when my lighttpd is running with my credentials. The frustrating thing is that it looks like nobody has this problem, so I can’t find anything on how to solve the problem.

I don’t have enough knowledge on filesytem permissions, so I can’t understand why I have permission problems even with the web server running on my user and group.

The error I get is:

Failed to write cache file “/path/to/twig/cache/file.php”

OK, I just found the error. Turns out I had disabled the “rename” function, required by Twig. Screen Shot 2016-02-24 at 3
I really hate when people use the “@” to suppress errors.