Linux and Yii - The directory is not writable by the Web process: /web/assets

I installed Yii2 on Ubuntu 16.04 using Vagrant and when I try to load some page, Yii gives me an error:

The directory is not writable by the Web process: /web/assets

I asked this question on another site and one man said that I need to change username in config.yaml file, I checked config.yaml file and found 2 lines: synced_folders -> owner and ssh -> username and both are “vagrant”, maybe I should rename it to “www-data” and what line? I also tried to change group in ubuntu from vagrant to www-data, but it doesn’t work, please help!

Did you check file permissions of web/ and web/assets/ folders?
I’m sure he meant the current linux username, who has the permissions to write to the folder.