Turning Advanced Permissions on doesn't stick!

Permalink
I first posted this as an issue on Github but they closed it and suggested I post it here instead to see if someone experienced the same.

==========================
I wanted to turn the Advanced Permissions feature so I was first warned that this cannot be undone. I clicked the below button and notified that advanced permissions are turned on. But... They weren't. If I go to Advanced Permissions link in the right-hand sidebar again, the scenario is the same. I was thinking about try to locate the database value for this and change it manually but... I'd rather wait for you guys to take care of this.

 
java9 replied on at Permalink Reply
I tried this on a separate dev server and it works fine. I actually had issues with file and directory permissions on this problematic server before (it's probably a vhost or dedicated server so...) and now I'm wondering on which files/directories should I check permissions in order for setting Advanced Permissions to stick?
andrew replied on at Permalink Reply
andrew
Ah, this makes sense. Most of our configuration options are now written to files rather than saved in the database. I would make sure all files and directories within application/config/ are writable.
ali7566 replied on at Permalink Reply
ali7566
Andrew - are there any other directories that should be set to writable on the server? I'm having issues enabling advanced permissions on my site which used to have them enabled... I have reverted back to an older version of my database to see if this helps at all but no luck.
ali7566 replied on at Permalink Reply
ali7566
I'm facing a similar issue on version 5.7.5.1.

I had advanced permissions enabled on the site for a while (3-6 months) but they have somehow reverted to simple permissions. If I go to advanced permissions under system settings in the dashboard the site states that 'Advanced permissions are turned off. Enable them below.' I click on enable site permissions the page will refresh and state 'Advanced permissions enabled.' but they aren't.

I've recursed 777 permissions into application/config files. Any more pointers onto how to get them back up and running?