cancel
Showing results for 
Search instead for 
Did you mean: 

Having trouble getting a clean install

SOLVED

Having trouble getting a clean install

I'm struggling very badly to install Magento 2.0.2 in a Virtual Machine (running Ubuntu Server 14.04LTS) before deploying in a VPS. I think I followed all the steps correctly at least up to the permissions part, but anyways, here is what I'm seeing:

-I used the Setup Wizard to install

-I want to install to the root of the page (not inside a sub-folder).

-No errors occured during the installation process

-I'm seeing only the HTML of the page, and many 404 errors in the Developer Console.

 

I don't know what else to do, I've tried going through the installation instructions multiple times and I think there's at least one page where the information is somewhat misleading:

 

[Setting the permissions - Roadmap]

 

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

1.1 Create magento user OK

1.2 Add magento user to the www-data group OK

 

Step 1 goes without hiccups. No problems, at least that I can notice.

 

2. http://devdocs.magento.com/guides/v2.0/install-gde/prereq/zip_install.html#install-perms-set

 

2.1 -Switch to the magento user account OK

2.2 -Set ownership... NOT OK

 

The magento user is not a sudoer, so it does not have root privileges. This means I cannot execute the command I'm told to as the magento user (chown -R :www-data .). So I switch to a user with root privileges and execute the command.

 

2.3 -Set permissions... ALSO NOT OK

 

This command has the same issue than the previous one because the magento user is not a sudoer. I cannot execute any of the commands from step 2 as the magento user, so why is that the first instruction when it doesn't work?

 

I ended up performing steps 2.2 and 2.3 as root and then switching to the magento user. I kept following instructions until the final step (setup wizzard) supposedly went well, until I exit the installation process (successfully) and don't have any CSS or JS files.

I have been trying to get this thing working a few hours now so I'm a bit frustrated... I'd appreciate any help I could get.

 

Best regards from Portugal,

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Having trouble getting a clean install

What ended up being the main issue, apart from setting the permissions correctly is running the following command with sudo permissions:

 

# a2enmod rewrite

 

This, along with some quirky chmod commands ultimately made my install successful.

 

Thanks to everyone that replied!

View solution in original post

5 REPLIES 5

Re: Having trouble getting a clean install

I spent a long time messing around with Magento 2 and also waiting for the install to be made easier. That never happened.

 

What I finally did was learn about the permissions, That was the key. I found out what user and group the default webuser was and then I put that user into my group and them myself into that group.

 

After that, I logged out and then back in and ran the command to take ownership of files and then change permissions for files and directories.

 

Now everything works great.

 

I ran these commands in ssh with root permissions. Has to be a uppercase "G" to set the secondary group. Substitute your user and the webuser.

 

usermod -G adminxxxx nobody

usermod -G nobody adminxxxx

 

service httpd restart

 

Logged into ssh as site user/site admin (Not Root)

 

Then ran

 

chown -R :nobody .

 

Then set permissions

 

find . -type d -exec chmod 770 {} \; && find . -type f -exec chmod 660 {} \; && chmod u+x bin/magento

 

If you have a different named default user (ie: :www-data). you would need to adjust the commands accordingly.

 

 

 

Re: Having trouble getting a clean install

Re: Having trouble getting a clean install

I thought the same thing. It was setting up the permissions and file ownership. The way it is explained in the documentation is very poor. Firstly, you need to have root access to your server. Then put the webuser into you group and put yourself into the webuser group. You cannot skip this, or it will not work.

 

Search online to find the commands that will show what the default webuser name is and then do as described above.

Re: Having trouble getting a clean install

Hello PCGamesPlus,

 

I believe I already said this, but I have already configured the users correctly. I have solved the problem, and I'm in the middle of configuring the shop. Thanks to both replies I got.

 

I will soon disclose how I was able to get it working in full detail, but in my case it was the apache configuration that was not correct, particularly the AccessOverride.

 

Best regards from Portugal,

Re: Having trouble getting a clean install

What ended up being the main issue, apart from setting the permissions correctly is running the following command with sudo permissions:

 

# a2enmod rewrite

 

This, along with some quirky chmod commands ultimately made my install successful.

 

Thanks to everyone that replied!