Once you have run upgrade command then if you will not give permission then you will get error like below:

image4

In order to resolve it you have to run few commands that will give proper permission commands are as :

  1. sudo chmod -R 777 var/
  2. sudo chmod -R 777 pub/
  3. sudo chmod -R 777 app/

Your permission issue will be resolved.