Closed ghost closed 10 years ago
@sherkenh can you send me your docker command line? Are you able to start the container using the quickstart instructions?
@sameersbn I have pulled the container with docker run -name redmine -d sameersbn/redmine. Everything works as expected. Pulling the source using this repository and building the container myself, however, results in the described behavior. The command line w/o my environment reads docker run -name redmine -d my/redmine (permission problems exist with both my parameters and no parameters at all). I verified that I am on commit b9a9a6a91eb1153152328e3a248a6b93c8b6fca2, which should be the same used for the container that I pulled from Docker index.
@sherkenh can you try rebuilding the image with the --no-cache option?
@sameersbn no change, still permission denied. Is there any difference from the Docker container that I pull from the index to the one I build myself? Sources are the same, right? File system permissions look correct, or am I missing something crucial?
@sherkenh lets take a closer.. first i just updated the repo sources. can you pull and build again? I just rebuild the image here and have no problems. can you check.
@sherkenh have you done any changes locally on the repo?
If you still see the issue can you login and send me the output of ls -l /redmine/ /redmine/config/
@sameersbn still no change. here's the output of ls -la /redmine/ /redmine/config/
/redmine/:
total 116
drwxr-x--- 20 www-data www-data 4096 Mar 19 18:36 .
drwxr-xr-x 115 root root 4096 Mar 19 18:38 ..
drwxr-xr-x 2 www-data www-data 4096 Mar 19 18:03 .bundle
-rw-rw-r-- 1 www-data www-data 731 Mar 2 11:28 .gitignore
-rw-rw-r-- 1 www-data www-data 607 Mar 2 11:28 .hgignore
-rw-rw-r-- 1 www-data www-data 1326 Mar 2 11:28 .travis.yml
-rw-rw-r-- 1 www-data www-data 240 Mar 2 11:28 CONTRIBUTING.md
-rw-rw-r-- 1 www-data www-data 3532 Mar 19 18:07 Gemfile
-rw-r--r-- 1 www-data www-data 3856 Mar 19 18:08 Gemfile.lock
-rw-rw-r-- 1 www-data www-data 205 Mar 2 11:28 README.rdoc
-rw-rw-r-- 1 www-data www-data 275 Mar 2 11:28 Rakefile
drwxrwxr-x 7 www-data www-data 4096 Mar 2 11:28 app
drwxrwxr-x 5 www-data www-data 4096 Mar 19 18:07 config
-rw-rw-r-- 1 www-data www-data 160 Mar 2 11:28 config.ru
drwxrwxr-x 3 www-data www-data 4096 Mar 2 11:28 db
drwxrwxr-x 2 www-data www-data 4096 Mar 2 11:28 doc
drwxrwxr-x 5 www-data www-data 4096 Mar 2 11:28 extra
drwxr-xr-x 2 www-data www-data 4096 Mar 2 11:28 files
-rwxr-xr-x 1 www-data www-data 5055 Mar 19 17:37 init
drwxrwxr-x 8 www-data www-data 4096 Mar 2 11:28 lib
drwxr-xr-x 2 www-data www-data 4096 Mar 2 11:28 log
drwxrwxr-x 16 www-data www-data 4096 Mar 19 18:07 plugins
drwxrwxr-x 8 www-data www-data 4096 Mar 19 18:07 public
drwxrwxr-x 2 www-data www-data 4096 Mar 2 11:28 script
drwxr-x--- 7 www-data www-data 4096 Mar 19 18:08 setup
drwxrwxr-x 9 www-data www-data 4096 Mar 2 11:28 test
drwxrwxrwt 8 www-data www-data 4096 Mar 2 11:28 tmp
drwxrwxr-x 3 www-data www-data 4096 Mar 19 18:03 vendor
/redmine/config/:
total 88
drwxrwxr-x 5 www-data www-data 4096 Mar 19 18:07 .
drwxr-x--- 20 www-data www-data 4096 Mar 19 18:36 ..
-rw-r--r-- 1 www-data www-data 161 Mar 19 18:07 additional_environment.rb
-rw-rw-r-- 1 www-data www-data 219 Mar 2 11:28 additional_environment.rb.example
-rw-rw-r-- 1 www-data www-data 2451 Mar 2 11:28 application.rb
-rw-rw-r-- 1 www-data www-data 191 Mar 2 11:28 boot.rb
-rw-rw-r-- 1 www-data www-data 7222 Mar 2 11:28 configuration.yml.example
-rw-r--r-- 1 www-data www-data 162 Mar 19 18:07 database.yml
-rw-rw-r-- 1 www-data www-data 1228 Mar 2 11:28 database.yml.example
-rw-rw-r-- 1 www-data www-data 592 Mar 2 11:28 environment.rb
drwxrwxr-x 2 www-data www-data 4096 Mar 2 11:28 environments
drwxrwxr-x 2 www-data www-data 4096 Mar 2 11:28 initializers
drwxrwxr-x 2 www-data www-data 4096 Mar 2 11:28 locales
-rw-rw-r-- 1 www-data www-data 649 Mar 2 11:28 preinitializer.rb
-rw-rw-r-- 1 www-data www-data 16666 Mar 2 11:28 routes.rb
-rw-rw-r-- 1 www-data www-data 4957 Mar 2 11:28 settings.yml
In the same container I executed sudo -u www-data -H ls -la /redmine/ /redmine/config/
ls: cannot access /redmine/config/: Permission denied
ls: cannot open directory /redmine/: Permission denied
This issue is really strange since all files are properly owned by www-data, there are no additional acl set (checked with getfacl
).
Could this be an issue with my Docker version? I'm running Docker version 0.8.0, build cc3a8c8. On the other hand, I'm running a couple other containers without any issues.
Also, I'm not using any other switches to docker run the image.
Some more information on my setup:
sherkenh@docker docker-redmine % lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 12.04.4 LTS
Release: 12.04
Codename: precise
sherkenh@docker docker-redmine % uname -a
Linux docker 3.11.0-15-generic #25~precise1-Ubuntu SMP Thu Jan 30 17:39:31 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
btw, thanks for going into this issue!
@sherkenh this is very odd behaviour. on the other hand you mentioned that the same image when pulled from the docker index works. I am not able to understand what is going on. Could be a docker issue / host issue. Can you try updating your docker version or maybe try building the image on another host.
@sameersbn I have now cloned your repo to another machine and run docker build --no-cache -t my/redmine .
and docker run -name redmine -d my/redmine
This one is Docker version 0.8.1, build a1598d1 on Ubuntu 13.10 with Kernel 3.11.0-17-generic.
User: root Password: kai0iXafoh7e
Unlinking stale socket /var/run/supervisor.sock
mysqld: started
sed: can't read config/database.yml: Permission denied
sed: can't read config/database.yml: Permission denied
sed: can't read config/database.yml: Permission denied
sed: can't read config/database.yml: Permission denied
sed: can't read config/database.yml: Permission denied
sed: can't read config/database.yml: Permission denied
memcached: stopped
memcached: updated process group
memcached: started
sed: can't read config/additional_environment.rb: Permission denied
mv: accessing `plugins-1': Permission denied
rake aborted!
Permission denied - /redmine
(See full trace by running task with --trace)
rake aborted!
Permission denied - /redmine
(See full trace by running task with --trace)
mv: accessing `plugins': Permission denied
rake aborted!
Permission denied - /redmine
(See full trace by running task with --trace)
rake aborted!
Permission denied - /redmine
(See full trace by running task with --trace)
rake aborted!
Permission denied - /redmine
(See full trace by running task with --trace)
rake aborted!
Permission denied - /redmine
(See full trace by running task with --trace)
touch: cannot touch `tmp/restart.txt': Permission denied
--2014-03-20 14:14:39-- http://localhost/
Resolving localhost (localhost)... ::1, 127.0.0.1
Connecting to localhost (localhost)|::1|:80... failed: Connection refused.
Connecting to localhost (localhost)|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 403 Forbidden
2014-03-20 14:14:39 ERROR 403: Forbidden.
172.17.0.19:80 127.0.0.1 - - [20/Mar/2014:14:14:39 +0000] "GET / HTTP/1.1" 403 517 "-" "Wget/1.13.4 (linux-gnu)"
Same problem.
Something is really strange here. I will try to build the container on bare metal next time - these two where virtual machines flawlessly running several containers.
@sherkenh i am current using docker 0.9.0 on ubuntu 13.10. But as far as I can remember I never faced such an issue with older docker versions.
Is there any chance this could be a storage space issue on the host. What about RAM, the image would need a minimum of 256 - 512MB. I am just spit balling here.
@sherkenh if this is not the issue, then maybe you can push your image on the docker index and i will pull it and check it out here. Later you can delete the image from the index.
@sameersbn checkout sherkenh/redmine on Docker index
@sameersbn didn't mean to close this...
@sherkenh i was on travel. just returned today. will checkout your image and check it.
@sherkenh I had pulled this image and saw the same issue you are facing. Was not able to figure it out. Were you able to get around this? Maybe you can check with the latest docker version or something.
@sherkenh As it appears this issue could occur for two reasons.
The rule of thumb would be to always use the latest available docker release at least until version 1.0 is released
As such I am closing this issue.
I'm facing a very strange issue running this container on Docker version 0.8.0, build cc3a8c8.
Docker logs gives me this
When I ssh into the container and try to access the /redmine directory with root all is fine but not for its owner www-data.
The permissions on the directory look good, www-data should be able to read and cd into /redmine.
Comments much appreciated!