Fail To Load Assets Due To Permission Issues
Error: When access GitLab, the login page is broken, images and CSS files are not correctly loaded.
In Nginx error log
2013/08/23 13:52:19 [error] 31035#0: *1 open() "/home/git/gitlab/public/assets/login-logo-20fd89985ad8929292196a39fa51787c.png" failed (13: Permission denied), client: 10.191.131.75, server: devops.company.com, request: "GET /assets/login-logo-20fd89985ad8929292196a39fa51787c.png HTTP/1.1", host: "devops.company.com", referrer: "http://devops.company.com/users/sign_in"
2013/08/23 13:52:22 [error] 31035#0: *1 open() "/home/git/gitlab/public/assets/application-8d0430122c22e07faecdd974cd21a38b.css" failed (13: Permission denied), client: 10.191.131.75, server: devops.company.com, request: "GET /assets/application-8d0430122c22e07faecdd974cd21a38b.css HTTP/1.1", host: "devops.company.com", referrer: "http://devops.company.com/users/sign_in"
2013/08/23 13:52:22 [error] 31035#0: *10 open() "/home/git/gitlab/public/assets/application-7b88a88b92ad70a827dbedb75e5206b1.js" failed (13: Permission denied), client: 10.191.131.75, server: devops.company.com, request: "GET /assets/application-7b88a88b92ad70a827dbedb75e5206b1.js HTTP/1.1", host: "devops.company.com", referrer: "http://devops.company.com/users/sign_in"
Problem: Permission denied when nginx user was trying to open assets (images, CSS files). The nginx user does NOT have access to the assets directory because it is NOT member of the git
group.
NOTE: In the installation guide, adding Nginx user to the git group is NOT explicitly mentioned. However, it is well documented in theGitlab Recipes.
Solution:
Recommended
add nginx user to git group and give groups read/execute permission on /home/git
sudo usermod -a -G git nginx
sudo chmod g+rx /home/git/
Alternatively, replace the default nginx user with git and group root in /etc/nginx/nginx.conf
#user nginx;
user git root;
Then restart Nginx, the issue should be fixed. See issue 4893 for more information.
Error on first run the homepage return 502 bad gateway (nginx) after 30/60 seconds
Fix First start seems slow so increase the unicorn timeout to something larger, say 200. (Or buy faster hardware)
vim config/unicorn.rb
sudo /etc/init.d/gitlab restart
'Programming' 카테고리의 다른 글
자바스크립트: 차트 및 그래프를 그려보자(Javascript: Introduce Chart.js) (0) | 2014.11.04 |
---|---|
자바스크립트: 이미지 미리보기(Javascript: Image Preview) (3) | 2014.11.02 |
redmine 이관 작업 시 NoMethodError 날 때 처리 방법 (0) | 2014.04.16 |
DB tools > dbeaver 에서 테이블 복사 시 문제점 해결 방안 (0) | 2014.03.26 |
postgres timestamp update (0) | 2014.02.12 |
nodejs-gcm 에서 'ReferenceError: statusCode is not defined' 라고 오류가 날 때 (0) | 2014.01.27 |
eclipse 에서 share project 가 안 보일 때 (0) | 2014.01.20 |
Eclipse JBOSS 사용 시 에러 (1) | 2013.11.18 |
[postgres DB] 자동 증가값 가져오기 (0) | 2013.06.10 |
MAC 에서 Postgresql 설치하기 (0) | 2013.05.03 |