Fixing Permissions... in a more Secure Way?

Setting the directory permissions to 777 is easy... and perfectly fine for a development
machine. But if this were a production machine, well, 777 isn't ideal... though
honestly, a lot of people do this.

What's better? In a few minutes, we'll add a task to clear and warm up Symfony's
cache. On a production machine, after you've done that, you can set the var/cache
permissions back to be non-writeable, so 555. In theory, that should just work!
But in practice, you'll probably need to tweak a few other settings to use non-filesystem
cache - like making annotations cache in APC.

But, that's more about deployment - which we'll save for a different course!

Leave a comment!

2017-05-30Victor Bocharsky

Hey Jian,

Unfortunately, we don't have such course, but we talk about APC in this screencast: https://knpuniversity.com/s... . However, if you're on PHP >=5.5 - you probably want to use OPcache instead of APC.

Cheers!

2017-05-29jian su

Hi Guys: Which course talk about making annotations cache in APC? Thanks