{"action":"created","issue":{"url":"https://api.github.com/repos/myimouto/myimouto/issues/171","repository_url":"https://api.github.com/repos/myimouto/myimouto","labels_url":"https://api.github.com/repos/myimouto/myimouto/issues/171/labels{/name}","comments_url":"https://api.github.com/repos/myimouto/myimouto/issues/171/comments","events_url":"https://api.github.com/repos/myimouto/myimouto/issues/171/events","html_url":"https://github.com/myimouto/myimouto/issues/171","id":152065763,"number":171,"title":"After Installation \"An error has occurred.\"","user":{"login":"w1nr4r","id":18732196,"avatar_url":"https://avatars.githubusercontent.com/u/18732196?v=3","gravatar_id":"","url":"https://api.github.com/users/w1nr4r","html_url":"https://github.com/w1nr4r","followers_url":"https://api.github.com/users/w1nr4r/followers","following_url":"https://api.github.com/users/w1nr4r/following{/other_user}","gists_url":"https://api.github.com/users/w1nr4r/gists{/gist_id}","starred_url":"https://api.github.com/users/w1nr4r/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/w1nr4r/subscriptions","organizations_url":"https://api.github.com/users/w1nr4r/orgs","repos_url":"https://api.github.com/users/w1nr4r/repos","events_url":"https://api.github.com/users/w1nr4r/events{/privacy}","received_events_url":"https://api.github.com/users/w1nr4r/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-05-01T02:59:39Z","updated_at":"2016-05-01T19:12:57Z","closed_at":null,"body":"So when I go to my servers IP instead of the homepage I get\r\n\r\nerrors.png (image shows)\r\nAn error has occurred.\r\n\r\n```\r\n/var/www/myimouto$ sudo tail /var/log/nginx/error.log\r\n#6 [internal function]: Rails::exceptionHandler(Object(Rails\\Exception\\PHPError\\W\" while reading response header from upstream, client: xx.xx.xxx.xx, server: localhost, request: \"GET / HTTP/1.1\", upstream: \"fastcgi://unix:/var/run/php5-fpm.sock:\", host: \"xx.xx.xx.xx\"\r\n2016/05/01 02:43:57 [error] 9586#0: *1 FastCGI sent in stderr: \"PHP message: PHP Fatal error:  Uncaught exception 'ErrorException' with message 'fopen(/var/www/myimouto/log/production.log): failed to open stream: Permission denied' in /var/www/myimouto/vendor/zendframework/zend-log/src/Writer/Stream.php:79\r\nStack trace:\r\n#0 [internal function]: Zend\\Stdlib\\ErrorHandler::addError(2, 'fopen(/var/www/...', '/var/www/myimou...', 79, Array)\r\n#1 /var/www/myimouto/vendor/zendframework/zend-log/src/Writer/Stream.php(79): fopen('/var/www/myimou...', 'a', false)\r\n#2 /var/www/myimouto/vendor/railsphp/railsphp/lib/Rails/Rails.php(448): Zend\\Log\\Writer\\Stream->__construct('/var/www/myimou...')\r\n#3 /var/www/myimouto/vendor/railsphp/railsphp/lib/Rails/Rails.php(155): Rails::defaultLogger()\r\n#4 /var/www/myimouto/vendor/railsphp/railsphp/lib/Rails/Rails.php(304): Rails::log()\r\n#5 /var/www/myimouto/vendor/railsphp/railsphp/lib/Rails/Rails.php(268): Rails::reportException(Object(Rails\\Exception\\PHPError\\Warning))\r\n#6 [internal function]: Rails::exceptionHandler(Object(Rails\\Exception\\PHPError\\W\" while reading response header from upstream, client: xx.xx.xxx.xx, server: localhost, request: \"GET / HTTP/1.1\", upstream: \"fastcgi://unix:/var/run/php5-fpm.sock:\", host: \"xx.xx.xx.xx\"\r\n```\r\n\r\nThis is what the production.log shows\r\n\r\n`[01-May-2016 03:08:56 UTC] [xx.xx.xxx.xx] GET /\r\nPHP Warning\r\nmkdir(): Permission denied \r\n#0 [internal function]: Rails::errorHandler(2, 'mkdir(): Permis...', '/var/www/myimou...', 79, Array)\r\n#1 Rails/Cache/Store/FileStore/Entry.php(79): mkdir('/var/www/myimou...', 511, true)\r\n#2 Rails/Cache/Store/FileStore.php(27): Rails\\Cache\\Store\\FileStore\\Entry->write(0)\r\n#3 Rails/Cache/Cache.php(54): Rails\\Cache\\Store\\FileStore->write('post_count=v=0', 0, Array)\r\n#4 Rails/Cache/Cache.php(86): Rails\\Cache\\Cache->write('post_count=v=0', 0, Array)\r\n#5 app/models/Post/CountMethods.php(15): Rails\\Cache\\Cache->fetch(Array, Object(Closure))\r\n#6 app/controllers/StaticController.php(14): Post::fast_count()\r\n#7 Rails/ActionController/Base.php(268): StaticController->index()\r\n#8 Rails/ActionController/Base.php(238): Rails\\ActionController\\Base->runAction('index')\r\n#9 Rails/Application/Base.php(188): Rails\\ActionController\\Base->run_request_action()\r\n#10 Rails/Application/Base.php(39): Rails\\Application\\Base->_run()\r\n#11 public/index.php(3): Rails\\Application\\Base::dispatchRequest()\r\n#12 {main}\r\nError context:\r\narray(2) {\r\n  [\"val\"]=>\r\n  int(0)\r\n  [\"header\"]=>\r\n  string(0) \"\"\r\n}\r\n`\r\n\r\n\r\nNot sure how to fix this... Is it folder/file permissions?  Any help is appreciated.\r\n"},"comment":{"url":"https://api.github.com/repos/myimouto/myimouto/issues/comments/216065173","html_url":"https://github.com/myimouto/myimouto/issues/171#issuecomment-216065173","issue_url":"https://api.github.com/repos/myimouto/myimouto/issues/171","id":216065173,"user":{"login":"Parziphal","id":5176023,"avatar_url":"https://avatars.githubusercontent.com/u/5176023?v=3","gravatar_id":"","url":"https://api.github.com/users/Parziphal","html_url":"https://github.com/Parziphal","followers_url":"https://api.github.com/users/Parziphal/followers","following_url":"https://api.github.com/users/Parziphal/following{/other_user}","gists_url":"https://api.github.com/users/Parziphal/gists{/gist_id}","starred_url":"https://api.github.com/users/Parziphal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Parziphal/subscriptions","organizations_url":"https://api.github.com/users/Parziphal/orgs","repos_url":"https://api.github.com/users/Parziphal/repos","events_url":"https://api.github.com/users/Parziphal/events{/privacy}","received_events_url":"https://api.github.com/users/Parziphal/received_events","type":"User","site_admin":false},"created_at":"2016-05-01T19:12:57Z","updated_at":"2016-05-01T19:12:57Z","body":"According to my experience, sometimes the server's user is different from the user that created the files. So even if the folder is set to 777, the server's user can't create a new file/folder inside because tmp's parent folder's permissions don't allow that. If that's the problem, add the server's user (usually www-data) to your user group."}}