Uploads directory documentation
Summary
Source installation mentions public/uploads directory which no longer exists.
Steps to reproduce
Clean installation from source following https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/install/installation.md
The first issue is when you get to this step:
# Make sure GitLab can write to the public/uploads/ directory
sudo chmod -R u+rwX public/uploads
The folder was removed from git at commit 8f584d5f so doesn't exist when you try and run this.
Expected behavior
I think the depends on what the change, 8f584d5f, was trying to achieve. Running GitLab and uploading a file to a wiki creates the required directory but the permissions on the directory don't match the checks needed by the rake task gitlab:check (see further down for the output).
host:/data/git/gitlab # ls -al public/uploads
total 16
drwxr-xr-x 4 git git 4096 Jan 22 16:46 .
drwxr-xr-x 5 git git 4096 Jan 22 16:46 ..
drwxr-xr-x 3 git git 4096 Jan 22 16:46 steve
drwxr-xr-x 3 git git 4096 Jan 22 16:46 tmp
And I just uploaded an avatar for a user and that appeared to work without any explicit permissions being made to the directory that the code created.
Output of checks
Results of GitLab Application Check
This is failing as mentioned above as the public/uploads directory doesn't exist when installation to give the correct permissions to.
Checking GitLab Shell ...
GitLab Shell version >= 2.6.10 ? ... OK (2.6.10)
Repo base directory exists? ... yes
Repo base directory is a symlink? ... no
Repo base owned by git:git? ... yes
Repo base access is drwxrws---? ... yes
hooks directories in repos are links: ...
1/1 ... repository is empty
2/2 ... ok
2/3 ... repository is empty
1/4 ... repository is empty
Running /sami/git/gitlab-shell/bin/check
Check GitLab API access: OK
Check directories and files:
/sami/git/repositories/: OK
/sami/git/.ssh/authorized_keys: OK
Test redis-cli executable: redis-cli 3.0.6
Send ping to redis server: PONG
gitlab-shell self-check successful
Checking GitLab Shell ... Finished
Checking Sidekiq ...
Running? ... yes
Number of Sidekiq processes ... 1
Checking Sidekiq ... Finished
Checking Reply by email ...
Reply by email is disabled in config/gitlab.yml
Checking Reply by email ... Finished
Checking LDAP ...
LDAP is disabled in config/gitlab.yml
Checking LDAP ... Finished
Checking GitLab ...
Git configured with autocrlf=input? ... yes
Database config exists? ... yes
Database is SQLite ... no
All migrations up? ... yes
Database contains orphaned GroupMembers? ... no
GitLab config exists? ... yes
GitLab config outdated? ... no
Log directory writable? ... yes
Tmp directory writable? ... yes
Uploads directory setup correctly? ... no
Try fixing it:
sudo chmod 0750 /sami/git/gitlab/public/uploads
For more information see:
doc/install/installation.md in section "GitLab"
Please fix the error above and rerun the checks.
Init script exists? ... yes
Init script up-to-date? ... yes
projects have namespace: ...
1/1 ... yes
2/2 ... yes
2/3 ... yes
1/4 ... yes
Redis version >= 2.8.0? ... yes
Ruby version >= 2.1.0 ? ... yes (2.1.8)
Your git bin path is "/usr/bin/git"
Git version >= 1.7.10 ? ... yes (2.7.0)
Active users: 2
Checking GitLab ... Finished
Results of GitLab Environment Info
System information
System:
Current User: git
Using RVM: no
Ruby Version: 2.1.8p440
Gem Version: 2.2.5
Bundler Version:1.11.2
Rake Version: 10.5.0
Sidekiq Version:4.0.1
GitLab information
Version: 8.4.0
Revision: e9d64e1
Directory: /data/git/gitlab
DB Adapter: mysql2
URL: http://example.com
HTTP Clone URL: http://example.com/some-group/some-project.git
SSH Clone URL: git@example.com:some-group/some-project.git
Using LDAP: no
Using Omniauth: no
GitLab Shell
Version: 2.6.10
Repositories: /data/git/repositories/
Hooks: /data/git/gitlab-shell/hooks/
Git: /usr/bin/git
Possible fixes
So either the installation.md and gitlab:check rake need to be updated to handle the change in permissions (and folder not existing), or the folder needs to be put back into the repository so that the documentation can be followed and rake runs without error.