ericpaulbishop / redmine_git_hosting

A ChiliProject/Redmine plugin which makes configuring your own git hosting easy.
186 stars 37 forks source link

Shell scripts in /tmp not compatible with multiple simultaneous installations. #101

Closed kubitron closed 13 years ago

kubitron commented 13 years ago

In a system with multiple gitolite installations (and multiple redmine installations on different virtual hosts), the configuration of shell scripts in /tmp causes problems.

I suggest putting the scripts in RAILS_ROOT/tmp instead to isolate them within each installation:

    @@git_hosting_tmp_dir ||= Rails.root.join("tmp", "redmine_git_hosting")
ericpaulbishop commented 13 years ago

On the other hand, if you have multiple redmine installations and a single gitolite installation shared, the current setup is better.

If you want to address this, the proper way to do it is to make the tmp directory a customizable setting on the plugin settings page. This isn't a priority of mine right now, but if you'd care to implement it, I'd be happy to accept your patch.

kubitron commented 13 years ago

I would point out that putting the shell scripts in a directory associated with the redmine installation is much cleaner and makes it easier to put selinux labels on the scripts. Why put the scripts in /tmp? Why not make them generic (non-customized) and simply put them in a bin directory associated with the plugin?

tommyblue commented 12 years ago

For security reasons my /tmp folder is mounted with the noexec flag and the plugin doesn't work. I think that the temp path should be configurable through the init.rb file

kubitron commented 12 years ago

Use my version of the plugin. While it is not configurable in the way you suggest, it puts the shell scripts in the /bin directory of the plugin (so that I can make selinux work).

Perhaps this works for you? My version has a lot of other fixes as well:

https://github.com/kubitron/redmine_git_hosting/