We planned to create a stage of our Live System.

We are using Magento 2.0.4.

  • I installed Magento 2.0.4 with Composer and installed Magento over the Web.
  • I uploaded Themes and pub/media-Files to the desired destinations.
  • I implemented splendid-Internets de_DE-CSV. I importet the DB with mysql -Ddatabase < dump.sql (worked nicely)
  • corrected base_url in the core-row via PhpMyadmin
  • I removed cache and pub/static/*
  • I did bin/magento setup:static-content:deploy de_DE en_US
  • I switched to developer mode
  • I also commented the Dev-Line in the roots .htaccess out
  • Filesettings are correct (as stated in Magentos Documents)

However, we are receiving huge 404s on both frontend and backend.


  • change di.xml from Symlink to Copy
  • set files to 777

Non of those have worked.

enter image description here

Our server settings:

  • PHP 7.0
  • Apache2 (rewrites enabled)

The files are present in pub/static/..., however, you can't access them from the browser directly. Filesettings for those files are 755 for Folders, and 644 for files. Should be fine - but won't work.

We are running out of ideas.

  • Please check for .htaccess & Base URL which needs to be change Go to core_config_data table & check web/unsecure/base_url, web/secure/base_url
    – Jackson
    Sep 21, 2016 at 9:18
  • Ah, forgot to mention that - of course I did that already.
    – Max
    Sep 21, 2016 at 9:49

1 Answer 1


Solution was to modify two files:

  • vendor/magento/framework/Filesystem/DriverInterface.php
  • vendor/magento/module-deploy/Model/Filesystem.php

There are two lines that define which settings new files should have. I've changed it from 770to 775 and from 660 to 664. Now its working.

  • It will work until you do a composer update. Out of principal you should never edit anything in core files. I think your issue is that you have not set up your magento file owner correctly on your server, so files created by the command line are not accessible by the magento or www user, or you ran the commands using the wrong user.
    – tecjam
    Sep 21, 2016 at 12:16
  • The hosting env if set up to work perfectly file with owner settings (which has been verified multiple times by me and our hoster). However, of course, editing core files is not a good idea! Anyhow, "do an update" is not always the right answer to a question.
    – Max
    Sep 21, 2016 at 12:52
  • Well, somethings doesn't seem correct with your setup, else it would work ;). And "Do an update" wasn't the answer I gave you either. Did you check the file owner of your static content? Did you run the deployment command using the correct user? You can always issue the command using a different user than the one you are logged in as using something along these lines (if www-data is the correct user) su www-data -s /bin/bash -c "bin/magento setup:static-content:deploy de_DE en_US". Gruss vom Bodensee.
    – tecjam
    Sep 21, 2016 at 13:09
  • Meanwhile, we sortet the problem out and found out, that our hoster has security settings enabled that has problems with --0 settings. Therefore, there were literally no other chance besides changing the core function. The user who's managing the server via SSH is the correct and authorized user, yes, and commands have issued like described above. We didn't tried to change the user because another user would have the same Privileges (so it doesn't matter). Didn't wanted to sound harsh - every input is helpful! :-) Gruß aus München!
    – Max
    Sep 21, 2016 at 13:43
  • 1
    Glad to hear you sorted it. I didn't realise you were trying to run it on shared-hosting. And no harm done! =)
    – tecjam
    Sep 21, 2016 at 15:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.