Hello, I'm new to composer and got some questions about the rights and users.
Old way without composer: I add a new domain (f.e. www.mydomain.de) within my plesk and need to create a ftp user for this domain. Mostly I choose something that match the domain. So the ftp user for this domain (www.mydomain.de) is "mydomain.de" and ofc a password. Now I upload all files (f.e wordpress) per ftp. Now all the wordpress files has "mydomain.de;psacln", owner is "mydomain and group is "psacln". Thats it.
New way with composer: I add a new domain (f.e. www.mydomain.de) within my plesk and need to create a ftp user for this domain. Mostly I choose something that match the domain. So the ftp user for this domain (www.mydomain.de) is "mydomain.de" and ofc a password. Now I install wordpress per composer with the user root (I know, its not recommended). Now all the wordpress files has "root.de:root", owner is "root" and group is also "root".
The problem now is:
1. I cant edit any files via ftp, cause ftp user is mydomain.de;psacln but the owner of the files are root!
2. Some php software like oxid cant write any logs if the owner root. I need to change it to the ftp user.
3. The secrurity risk if the all files are available in the web with root permissions.
So what is the best solution for this problem. Can I just after the composer installion change the owner and group from root:root "back" to mydomain.de;psacln like the ftp user or should I install the php software from the beginning with the right user with composer. And if I do that, can I just use the ftp user for composer installation or need I to add a complete new user for the composer installation, that match the ftp user?
Sry for my bad englisch. I hope its somehow readable.
Greetings
Old way without composer: I add a new domain (f.e. www.mydomain.de) within my plesk and need to create a ftp user for this domain. Mostly I choose something that match the domain. So the ftp user for this domain (www.mydomain.de) is "mydomain.de" and ofc a password. Now I upload all files (f.e wordpress) per ftp. Now all the wordpress files has "mydomain.de;psacln", owner is "mydomain and group is "psacln". Thats it.
New way with composer: I add a new domain (f.e. www.mydomain.de) within my plesk and need to create a ftp user for this domain. Mostly I choose something that match the domain. So the ftp user for this domain (www.mydomain.de) is "mydomain.de" and ofc a password. Now I install wordpress per composer with the user root (I know, its not recommended). Now all the wordpress files has "root.de:root", owner is "root" and group is also "root".
The problem now is:
1. I cant edit any files via ftp, cause ftp user is mydomain.de;psacln but the owner of the files are root!
2. Some php software like oxid cant write any logs if the owner root. I need to change it to the ftp user.
3. The secrurity risk if the all files are available in the web with root permissions.
So what is the best solution for this problem. Can I just after the composer installion change the owner and group from root:root "back" to mydomain.de;psacln like the ftp user or should I install the php software from the beginning with the right user with composer. And if I do that, can I just use the ftp user for composer installation or need I to add a complete new user for the composer installation, that match the ftp user?
Sry for my bad englisch. I hope its somehow readable.
Greetings
Last edited: