I uploaded all files via SFTP and installed Magento fine, but after install when it takes me to the admin panel, I log in and I see there's no styles being applied at all. It's just one big bulleted list.
So I looked at the page in Developer Tools and found these errors.
http://www.mydomain.xyz/pub/static/adminhtml/Magento/backend/en_US/extjs/resources/css/ext-all.css Failed to load resource: the server responded with a status of 403 (Forbidden)
http://www.mydomain.xyz/pub/static/adminhtml/Magento/backend/en_US/extjs/resources/css/ytheme-magent... Failed to load resource: the server responded with a status of 403 (Forbidden)
http://www.mydomain.xyz/pub/static/adminhtml/Magento/backend/en_US/css/styles.css Failed to load resource: the server responded with a status of 403 (Forbidden)
http://www.mydomain.xyz/pub/static/adminhtml/Magento/backend/en_US/images/magento-icon.svg Failed to load resource: the server responded with a status of 403 (Forbidden)
http://www.mydomain.xyz/pub/static/adminhtml/Magento/backend/en_US/mage/requirejs/mixins.js Failed to load resource: the server responded with a status of 403 (Forbidden)
http://www.mydomain.xyz/pub/static/adminhtml/Magento/backend/en_US/requirejs/require.js Failed to load resource: the server responded with a status of 403 (Forbidden)
http://www.mydomain.xyz/pub/static/_requirejs/adminhtml/Magento/backend/en_US/requirejs-config.js Failed to load resource: the server responded with a status of 403 (Forbidden)
www.mydomain.xyz/:39 Uncaught TypeError: require.config is not a function(anonymous function) @ www.mydomain.xyz/:39
www.mydomain.xyz/:87 Uncaught TypeError: require is not a function(anonymous function) @ www.mydomain.xyz/:87
www.mydomain.xyz/:286 Uncaught TypeError: require is not a function(anonymous function) @ www.mydomain.xyz/:286
www.mydomain.xyz/:418 Uncaught TypeError: require is not a function(anonymous function) @ www.mydomain.xyz/:418
www.mydomain.xyz/:463 Uncaught TypeError: require is not a function(anonymous function) @ www.mydomain.xyz/:463
www.mydomain.xyz/:504 Uncaught TypeError: require is not a function(anonymous function) @ www.mydomain.xyz/:504
www.mydomain.xyz/:527 Uncaught TypeError: require is not a function(anonymous function) @ www.mydomain.xyz/:527
www.mydomain.xyz/:550 Uncaught TypeError: require is not a function(anonymous function) @ www.mydomain.xyz/:550
http://www.mydomain.xyz/pub/static/adminhtml/Magento/backend/en_US/images/magento-icon.svg Failed to load resource: the server responded with a status of 403 (Forbidden)
chrome-extension://hompjdfbfmmmgflfjdlnkohcplmboaeo/js/rightclick.js:1 allow right click initializing for http://www.mydomain.xyz/sysop/admin/dashboard/index/key/8deb2f9deb91fc0734b38d1d07423d8fb8806eac68c3...
http://www.mydomain.xyz/pub/static/adminhtml/Magento/backend/en_US/Magento_Theme/favicon.ico Failed to load resource: the server responded with a status of 403 (Forbidden)
chrome-extension://hompjdfbfmmmgflfjdlnkohcplmboaeo/js/rightclick.js:25 allow right click processing http://www.mydomain.xyz/sysop/admin/dashboard/index/key/8deb2f9deb91fc0734b38d1d07423d8fb8806eac68c3...
http://www.mydomain.xyz/pub/static/adminhtml/Magento/backend/en_US/Magento_Theme/favicon.ico Failed to load resource: the server responded with a status of 403 (Forbidden)
http://www.mydomain.xyz/pub/static/adminhtml/Magento/backend/en_US/extjs/resources/css/ext-all.css Failed to load resource: the server responded with a status of 403 (Forbidden)
http://www.mydomain.xyz/pub/static/adminhtml/Magento/backend/en_US/extjs/resources/css/ytheme-magent... Failed to load resource: the server responded with a status of 403 (Forbidden)
http://www.mydomain.xyz/pub/static/adminhtml/Magento/backend/en_US/css/styles.css Failed to load resource: the server responded with a status of 403 (Forbidden)
Why would this have happened?
I could go through each of these and try to fix the permissions, but it makes me nervous that something else might be messed up with permissions and cause a strange problem later.
Is there a way to fix this with SFTP (Filezilla) instead of having to log in via SSH? I found a couple articles that kind of seem to address this and say to set all directories to 500, but geez, there's hundreds of directories.
I'll be happy to do things over again the right way if I need to. Should I not have uploaded the files via SFTP?
I had read that, but I don't really understand the whole thing about the permissions of the web server, the owner of the file system, the group, the web server user... I'm just looking at the permissions in Filezilla, which has Owner, Group, and Public.
As far as I can tell, the permissions are set to 770 for directories and 777 for files. I had to go through and change a few from 755 to 770. I checked each level of the directory structure for a couple of the above files and that's what I'm seeing for each one now, but I'm still getting the errors. I can imagine that some other directories are not 770, but am I really supposed to have to go through all the hundreds of directories to check them? What could have happened?
I'm also concerned because shouldn't have these been all set to 770 to begin with by the setup wizard? What am I doing weird that's causing me to have to go through this?
Actually I keep changing the permissions with Filezilla, and at first it looks like the changes take effect as 770, but then they all go back to 755. What could be wrong?
Can anyone help with this?
What could be so weird about my hosting environment that this could happen? I'm using InMotion hosting, which is right up there among the most popular ones, and they claim to have other Magento stores hosted.
I've never encountered a situation where I've had to mess with file system owner stuff. Permissions I can do. What happened here? Do I need to hire someone and figure out how to create a shell account for them in order to install this? Would that even help? I can do that, but I just have no idea what to do next.
When I try accessing one of the CSS files directly in my browser, should I be able to open it? Should I be getting the 403 error? Are those files meant to only be opened by other Magento files? Does this mean there's an issue with permission for those other files? What should I look at?
I was able to get SSH access and here are the commands I entered.
cd public_html
chown -R myusername .
find . -type d -exec chmod 770 {} \; && find . -type f -exec chmod 660 {} \; && chmod u+x bin/magento
public_html is the directory I have Magento installed in, the web server root.
myusername is the first name shown when I enter the 'users' command and corresponds to my account name.
This is according to the instructions at
http://devdocs.magento.com/guides/v2.0/install-gde/prereq/file-system-perms.html#install-perms-set
Before it was just the CSS and JS files giving me a 403 when I looked in the developer console. Now I'm getting a 403 error from the browser trying to access mydomain.com. So somehow this made it worse.
Any suggestions?
So my next step is tightening up the permissions with this command, and somehow that prevented the browser 403 error.
find . -type d -exec chmod 750 {} \; && find . -type f -exec chmod 644 {} \; && chmod u+x bin/magento
Now I'm back to square one, with the CSS and JS files not loading due to 403 errors as shown in the console. This page describes the problem I was having.
http://devdocs.magento.com/guides/v2.0/install-gde/trouble/tshoot_no-styles.html
But the solutions it gives requires I have root access to apache, and my host, InMotion, isn't familiar with any such problem with Magento 2.0 and can't suggest anything but to upgrade from shared hosting to VPS hosting and maybe that will fix the problem. And the apache commands it's suggesting sound like standard things for setting up a web server, and I assume InMotion already has all that set up. Right now InMotion is more familiar with Magento 1 and it sounds like I might be the first person attempting to install Magento 2 with them.
Any suggestions?
Try setting the file permission for directories to 755 and see if that resolves the issue.