About chmod issue

@digitalstartup

So, If I understand well you say me that all permission is ok?
Pls. explain me again this two command works:
sudo chown magento:www-data /var/www/html/ - Is this command give owner rigths for magento user.
If I would like to reset this rights, I run sudo chown -R magento:www-data /var/www/html/ ??
Furtermore, is this long comands set the permission for this files and directories?
find var generated vendor pub/static pub/media app/etc -type f -exec chmod g+w {} + && find var generated vendor pub/static pub/media app/etc -type d -exec chmod g+ws {} + && chown -R :www-data . && chmod u+x bin/magento
By the way, I see the before last line chown -R… Could you explain what does it mean? We take the right from www-data?