MODX Community

How to (temporarily) change write permissions on cached files?

Hi all,

I am building a site on my local using static files. I want to use Gulp to clear MODX’s cache everytime I work on a file so I don’t have to go into Manager and clear cache via the menu every time I make a change.

I’ve got the Gulp command down (using the ‘del’ npm packge), but I needed to chmod the cache directory to make the files and folders writable for it to work. Of course, every time the cache is rebuilt I have to repeat the chmod.

Would anyone know if there is way to change the write permissions on cached files whilst I am developing locally?

If the created files don’t automatically get the appropriate chmod values, you can create new_file_permissions and new_folder_permissions system settings with the right value (e.g. 0775 instead of the more common 0755).

FYI, it’s not as convenient as Gulp, but the CacheClear extra will manually clear the entire cache for you in the Manager.