sameersbn/docker-redmine — pull request #24 by petiepooo (2014-08-14 16:43:08+00:00)
Title: fix ownership issue with /redmine/files/VERSION

Running echo under sudo does not change the user who opens the redirect file, as that's the parent shell that sets that up before calling sudo.

For writing to privileged files with sudo, I've most often seen this construct which uses tee. Since tee is started under sudo, it can open the privileged file and copy what it receives on stdin into it.