I have a question regarding file permissions. I created a new user with sudo, and set the directory to chown (username). So far so good, only now the situation: When the system (magento2) creates new files, or I upload via magento 2 new files, the owner is 'www-data' instead of magento2 username.
Question:
What Do I need to do that every new file that magento will create or the file that I upload via magento will get the owner as: magento2 instead of www-data?
Server:
Ubuntu 16.04 Nginx 1.10 PHP7
I created the user like this:
- adduser magento2
- usermod -aG sudo magento2
Then I chownd like this:
sudo chown -R magento2:www-data /home/magento2
sudo find /home/magento2 -type d -exec chmod g+s {} \;
Thanks in advance,
HRR