Setting permissions for developer mode / production mode

I have installed magento (using tar file from magento) and changed to developer mode. Read the docs in https://devdocs.magento.com/guides/v2.2/config-guide/prod/prod_file-sys-perms.html In default or developer mode, the following directories must be writable by the user: vendor app/etc pub/static var Any other static resources generated/code generated/metadata var/view_preprocessed In file manager, I can see those folders are marked as…