After copying all files / db on my local VB when I tried to setup permissions:
find var vendor pub/static pub/media app/etc -type f -exec chmod g+w {} + && find var vendor pub/static pub/media app/etc -type d -exec chmod g+ws {} + && chown -R :apache . && chmod u+x bin/magento
Getting error [chown: invalid group: ‘:apache’]
I can see that apache is installed and running.
#sudo apache2ctl configtest: Syntax OK
#sudo a2enmod rewrite: Module rewrite already enabled
#sudo systemctl restart apache2: OK
#sudo ufw allow ‘Apache full’: Skipping adding existing rule: Skipping adding existing rule (v6)
#Sudo ufw allow ssh: Skipping adding existing rule: Skipping adding existing rule (v6)
Am working on Magento 2.4.3 on Ubuntu 20.04.3 LTS, PHP 7.4.3 with MySQL 8. Exactly same as my live site.