If you are trying to update your WordPress plugins and running into errors, you might not have the proper permissions. Here is an example of setting the proper permissions. Just make sure to replace ‘/var/www/wordpress’ with your server’s WordPress directory.
sudo find /var/www/wordpress -type d -exec chmod 755 {} \;
sudo find /var/www/wordpress -type f -exec chmod 644 {} \;
sudo chown -R www-data:www-data /var/www/wordpress