// change to your current project directory e.g. /var/www/yourproject
// 1. method: change permissions so that everyone could write the directories
chmod -vR 0777 assests
chmod -vR 0777 protected/runtime
// 2. method: change owner of directories and directories content to webserver user (e.g www-data) and grant write access only to that user
chown -vR www-data assets
chown -vR www-data protected/runtime
chmod -vR 0744 assets
chmod -vR 0744 protected/runtime