magento 2.4 installation on cwp query
-
-
How do you ensure that the permission to the magento root is not overwritten all the time. For instance , i have to each time grant permision to the “user” in cwp, before the command is accepted or permission will be denied and sometimes the command is not even accepted
-
Do I install composer as the root or the user with ssh access?
-
-
@legend it is best to login as user via ssh, you can easily do it via this change user command :
su -l username -s /bin/bash
**replace username with the username of the account.
-
@sandeep Thanks.
- Do I need to download composer as this user? I tried this but permission denied.
Also do I set the permissions to the user as root?
Cheers,
-
@legend hi you need to download composer as root for global, then you can use it as user check our blog for the instructions.
login as root via ssh then run this command, navigate to website script dir :
su -l username -s /bin/bash
then you can execute composer as user .
that means all files are created as user. You can run below command to fix file permission at once :
find -xtype d | xargs chmod 755 find -xtype f | xargs chmod 644
ensure you are in right directory before running upper commands.
-
@sandeep Perfect.
-
this "find -xtype f | xargs chmod 644" gives the following:
xargs: unmatched single quote; by default quotes are special to xargs unless you use the -0 option -
@legend said in magento 2.4 installation on cwp query:
xargs: unmatched single quote;
which os centos 8 or 7 ?
-
@legend said in magento 2.4 installation on cwp query:
this "find -xtype f | xargs chmod 644" gives the following:
xargs: unmatched single quote; by default quotes are special to xargs unless you use the -0 optionyou can use this commands alternatively :
find . -type d -exec chmod 755 {} \; find . -type f -exec chmod 644 {} \;
-
@sandeep centos 7
-
@legend said in magento 2.4 installation on cwp query:
@sandeep centos 7
in 7 that command runs perfectly. Try alternative command.