I'm familiar with magento1 and decided to learn about magento2 so I've been trying to install it but am having some difficulties with permissions of folders and files.
I've looked at lots of videos, tutorials and documentations but I can't seem to get it right.
I'm working on ubuntu 20.04, have already installed lamp stack, elasticsearch, composer...
After that, when I switch to the user I've created specifically for that purpose, I create a directory in /var/www/html named magento2 and use composer to download magento 2.4
At this point, I'm supposed to run this command :
cd /var/www/html/magento2 && find var generated vendor pub/static pub/media app/etc -type f -exec chmod u+w {} + && find var generated vendor pub/static pub/media app/etc -type d -exec chmod u+w {} + && chmod u+x bin/magento
However I'm getting an error saying I don't have the rights for certain files, namely
- var/composer_home/cache/.htaccess
- var/composer_home/.htaccess
- var/.regenerate.lock
- var/cache/mage--f/mage---ea6_MAGE_VERSION
- var/cache/mage-tags/mage---ea6_CONFIG
- var/cache/mage-tags/mage---ea6_MAGE
- var/log/debug.log
- var/log/magento.cron.log
- var/log/system.log
- generated/code/Magento/Framework/Event/Config/Reader/Proxy.php
- generated/code/Magento/Framework/Validator/RegexFactory.php
- generated/code/Magento/Framework/ObjectManager/Config/Reader/Dom/Proxy.php
- generated/code/Magento/Framework/App/ResourceConnection/Proxy.php
- generated/code/Magento/Framework/App/ResourceConnection/Config/Proxy.php
- generated/code/Magento/Framework/Config/Composer/PackageFactory.php
- generated/code/Magento/Framework/Data/Argument/InterpreterInterface/Proxy.php
- generated/code/Magento/Backend/App/Request/PathInfoProcessor/Proxy.php
- generated/code/Magento/Indexer/Model/Indexer/CollectionFactory.php
- generated/code/Symfony/Component/Console/Question/QuestionFactory.php
- generated/code/Symfony/Component/Console/Helper/TableFactory.php
- generated/code/Symfony/Component/Console/Input/ArrayInputFactory.php
- generated/code/Composer/Console/ApplicationFactory.php
I've checked their ownership and they link to root instead of magentouser. Other folders and files seem to have the right ownership so I don't understand what's happening...
Any help?
Thank you