cancel
Showing results for 
Search instead for 
Did you mean: 

Problem Installing

Problem Installing

So I've been trying to install Magento 2 CE to get use to the software before we get Enterprise.  The install works great but when I load the front / back end, no css or js is loading.  If I change the file permissions, it works.  If I clear any cache, it seems some file permissions reset somewhere and I have to change them again.  

 

I'm guessing its an issue relating to the user setup and file permissions setup. 

http://devdocs.magento.com/guides/v2.0/install-gde/prereq/apache-user.html

 

My account username (web server user) is called 'swimmers'.

I login as root to create a new user for Magento Ownership.

 

 

$ adduser magento2
$ passwd magento2

 

 

I then type a password for the account.  This next part I have issues with.

"Put the Magento file system (magento2) in the web server’s group (swimmers)"

 

I'm not sure to run the following as root or swimmers to find the group as noted in the documentation.

$ egrep -i '^user|^group' /etc/httpd/conf/httpd.conf

 

As root:

User nobody
Group nobody
UserDir public_html
UserDir disabled
UserDir disabled

 

As web server user (swimmers):

 

egrep: /etc/httpd/conf/httpd.conf: Permission denied

 

So I run the following to get the group(s) for the user 'swimmers' (As Root)

$ getent group | grep swimmers

The results are 

 

swimmers:x:515:swimmers

 

I would guess by the documentation that the Magento user (magento2) would need to be in the swimmers group? It says "Typically, the user and group name are both apache"  But I do not see this.

 

As I continue with the documentation  I use the following to add 'magento2' user to the swimmers grounp.

 

$ usermod -g swimmers magento2

 

Now when I look at the magento2 users and the groups which its in, I get the following:

 

 

$ getent group | grep magento2
magento2:x:32012:

 

 

I don't think it put the user into the group.  So instead I use supplementary groups and the command:

 

 

$ usermod -G swimmers magento2
$ getent group | grep magento2
swimmers:x:515:swimmers,magento2
magento2:x:32012:

 

Now I see 'magneto2' is part of the swimmers group. Unless i missed something, that was all to setup the magento file owner.  But when I login as 'magento2', I do not have access to the install directory (/home/swimmers/www).   This is where I'm stuck.  I tried installing Magento 2 CE with just the swimmer user but I get all kinds of permission issues when finished.  And none of the fixes on the forums help.

 

Any pointers?

 

 

1 REPLY 1

Re: Problem Installing

Anyone?