Sometimes, you may be asked to set write permission (777 or 666) for a particular directory which allows people upload documents to there or store files which are generated by web process such as generate cache or report files.
In my case, I’m getting write permission error message after move my WordPress site to another server. I know that I can use a Ftp client such as FileZilla to change permission of the folder to 777, it’s super easy. However, there are a lot of files already so the process may take hours to be finished.
Error: Your cache directory (/home/webroot/public_html/wp-content/cache/) or /home/webroot/public_html/wp-content need to be writable for this plugin to work. Double-check it. Cannot continue... fix previous problems and retry.
So, use FTP is not a good choice this time. Fortunately, we can use chmod Linux command to change the permission of the directory as well as its files and sub directories by using -R (recursive) option.
chmod -R 777 /home/webroot/public_html/wp-content/cache/
The command is very simple and just take around 1 second to set permission for all files and directories in cache folder recursively.