In general, at the moment, at the beginning of each month, when WordPress create new folder, the folder’s permission sometimes will be set so that “group users” will not have the right to write (upload files) in the folder. To change this, we open terminal, go to the folder which was just created for the new month and type
sudo chmod g+w 12 -R
In this case, the name of the month folder was “12”. Change it to fit to your need.
We also need to make sure the ownership of the folder is set to “www-data” rather than the default “nuttify”. To do this we use this code in the folder directory.
sudo chown nuttify:www-data * -R
This changes the ownership from Nuttify to www-data and makes sure this rule is recursive.