Feature #801


WebDAV access to Documents/Files

Added by Brian Lopez over 15 years ago. Updated about 10 years ago.

Target version:
Start date:
Due date:
% Done:


Estimated time:


There are a couple Ruby/Rails gems/plugins for adding WebDAV capabilities to your apps. Is this something feasable by the Redmine team to allow users to mount a WebDAV share for documents and files in Redmine?


redmine_webdav.tar (49.5 KB) redmine_webdav.tar Arnaud Martel, 2010-06-30 17:36
redmine_webdav.tar (49.5 KB) redmine_webdav.tar Arnaud Martel, 2010-06-30 17:55
webdav-xp.patch (3.96 KB) webdav-xp.patch Xabier Elkano, 2010-08-24 13:52 (5.72 KB) Xabier Elkano, 2010-08-25 09:22
log.txt (3.7 KB) log.txt Arnaud Martel, 2010-08-26 11:44
webdav-locks.patch (18.9 KB) webdav-locks.patch Xabier Elkano, 2010-09-30 11:44 (31.6 KB) Peter Philipp, 2010-10-23 13:03

Related issues

Has duplicate Redmine - Feature #3729: WebDAV Access for DocumentsClosed2009-08-11

Has duplicate Redmine - Feature #7710: Hierarchial Documents ModuleClosed2011-02-24

Actions #1

Updated by Yuriy Kravchenko over 15 years ago


Actions #2

Updated by Stephanie Collett about 15 years ago

+1 This is needed in our organization. Anybody still interested in this?

Actions #3

Updated by Nicolas Chuche about 15 years ago

Brian Lopez wrote:

There are a couple Ruby/Rails gems/plugins for adding WebDAV capabilities to your apps. Is this something feasable by the Redmine team to allow users to mount a WebDAV share for documents and files in Redmine?

It could be interresting. Do you know which one is stable and good enough to use in production in the real world ?

Actions #4

Updated by Brian Lopez about 15 years ago

Here's a few I was able to pull up relatively quickly:

I can't honestly stand behind either of these solutions, because I've never used them.

Actions #5

Updated by Nicolas Chuche about 15 years ago

I can't honestly stand behind either of these solutions, because I've never used them.

As you said it, mongrel-webdav-handler and webrick-webdav are not a solution.

I will try to read a bit about railsdav in the next weeks.

Actions #6

Updated by Anonymous about 15 years ago


Actions #7

Updated by Oleg Lozinskij about 15 years ago


Actions #8

Updated by Louis PERRIER about 15 years ago


Actions #9

Updated by Marcelo Murad almost 15 years ago


Actions #10

Updated by Alexey Lustin almost 15 years ago

it is very needed feature i think - for example - integrate with OpenOffice to share the documents into Redmine

thats why i give my "plus ten" for this feature

Actions #11

Updated by Sergey Lunev almost 15 years ago


Actions #12

Updated by Oleg Lozinskij over 14 years ago

Is there any progress on this ticket?

Actions #13

Updated by Jens Goldhammer over 14 years ago


Actions #14

Updated by Brian Lopez over 14 years ago

Hey guys,
From looking at trunk it appears that we're still on Rails 2.2, but I'd highly suggest moving to 2.3 because Rack introduces all kinds of possibilities for plugins and existing middleware that could enhance redmine quite a bit.

Specific to this ticket, check this out: - "WEBDAV Handler for Rack"

Actions #15

Updated by Oleg Lozinskij over 14 years ago

Brian Lopez wrote:

There are a couple Ruby/Rails gems/plugins for adding WebDAV capabilities to your apps. Is this something feasable by the Redmine team to allow users to mount a WebDAV share for documents and files in Redmine?

imho, the folder structure must be first added to Document/Files to support WebDav or am I wrong?

anyway, it would be also nice to have folders : )

Actions #16

Updated by Anonymous over 14 years ago


Actions #17

Updated by Michael Diederich over 14 years ago

+1, thx!

Actions #18

Updated by Dondoco Dondoco about 14 years ago


Actions #19

Updated by Scott Duensing about 14 years ago

+1 at least. This would be an awesome feature that would save me a lot of trouble!

Actions #20

Updated by Niels Lindenthal about 14 years ago


Actions #21

Updated by Holger Winkelmann about 14 years ago


Actions #22

Updated by Pedro Gutierrez almost 14 years ago

I agree. Webdav access to the documents would enhance the collaboration features of Redmine

Actions #23

Updated by Dave Lowndes almost 14 years ago

+1, I'd also suggest the team add the voting plugin to this project :)

Actions #24

Updated by Pedro Salido López over 13 years ago

+1, Sería muy útil poder disponer de una pestaña para integrar cada proyecto con un gestor documental mediante WebDAV

Actions #25

Updated by Carl Pef over 13 years ago

+1 yeah, it would be great !

Keep up the good work, guys
(And thanks for your hard work)

Actions #26

Updated by Jerome Vanthournout over 13 years ago


Actions #27

Updated by Dong Wang over 13 years ago


Actions #28

Updated by Peter Carrero over 13 years ago


Actions #29

Updated by Brian Showalter over 13 years ago


Actions #30

Updated by Wim Gillis over 13 years ago

I needed this feature for an intranet site, and got something like this working (with 0.9.3; not properly tested yet) with a bit of a workaround using Apache's webdav and some minor Redmine modifications. It's somewhat hackish, but may help some people.

  • Each project needs its own dir, instead of a single general /files. A possible fix for this is the following patch for app/models/attachment.rb, that will change attachment location to files/<project-identifier>, and create the dir when needed
    <   cattr_accessor :storage_path
    <   @@storage_path = "#{RAILS_ROOT}/files" 
    >       if not storage_path
    >         Dir.mkdir storage_path
    >       end
    <     "#{@@storage_path}/#{self.disk_filename}" 
    >     "#{self.storage_path}/#{self.disk_filename}" 
    >   def storage_path
    >     "#{RAILS_ROOT}/files/" + self.project.identifier    
    >   end 
  • Enable dav-fs module in Apache. For access control, you can make use of the functions used for svn webdav authentication. The vhost config should contain something like
    PerlLoadModule Apache::Authn::Redmine
    Alias /files /path/to/files
    <Location /files>
      DAV On
      AuthType Basic
      AuthName "authname" 
      PerlAccessHandler Apache::Authn::Redmine::access_handler
      PerlAuthenHandler Apache::Authn::Redmine::authen_handler
      RedmineDSN "DBI:Pg:database=redmine;host=" 
      RedmineDbUser "redminedbuser" 
      RedmineDbPass "redminedbpass" 
      Require valid-user
This will allow access to all members. If you want to have read-only roles as well, a possible fix would be to have an additional PerlAuthzHandler that checks if the user has the :manage_files permission. Example:
  • in, create the authz_handler sub
     use Apache2::Const qw(:common :override :cmd_how OK HTTP_UNAUTHORIZED);   # add OK & HTTP_UNAUTHORIZED
     sub authz_handler {
      my $r = shift;
      my $ret;
      my $user = $r->user;
      my $project_id = get_project_identifier($r);
      my $method = $r->method;
      if (defined $read_only_methods{$method}){
        $ret = 1;
      else {
        my $dbh = connect_database($r);
        my $sth = $dbh->prepare("select count(id) from roles where id in (select role_id from member_roles where member_id in (select id from members where user_id=(select id from users where login= ?) and project_id=(select id from projects where identifier = ?))) and permissions like '%:manage_files%'");
        $sth->execute($user, $project_id);
        $ret = 0;
        if (my @row = $sth->fetchrow_array) {
          if ($row[0] != 0){
            $ret = 1;
        undef $sth;
        undef $dbh;
      return ($ret == 1 ? Apache2::Const::OK : Apache2::Const::HTTP_UNAUTHORIZED);
  • then in Apache vhost config, add
    PerlAuthzHandler  Apache::Authn::Redmine::authz_handler
  • and create a 'Read-only file access' role without the :manage_files permission

Obviously, the webfrontend wont reflect the file system when files are deleted/modified/uploaded with external WebDAV clients, but at least its a userfriendly way for project managers to create some sort of shared storage and manage access control.

Actions #31

Updated by david caparros over 13 years ago


Actions #32

Updated by Arnaud Martel over 13 years ago

I'm working on a WebDav plugin and, right now, I have the following features:
  • webdav access to a project is done using an url like http://myserver/redmine/webdav/[project_id]
  • the plugin allows you to see folders with the following structure:
    • documents
      • title for document1
        • file1
        • file2
      • title for document2
        • file1
    • files
      • file1 (with no version)
      • file2 (with no version)
      • version1
        • file1
        • file2
      • version2
        • file1
        • file2
  • plugin is using REDMINE permissions (:view_files, :manage_files, :view_documents and :manage_documents) to grant access to files and folders
  • plugin allows you all files operations (create, delete, rename, move and copy)
  • plugin allows you to create documents (just create a folder inside the documents folder) but version creation is not allowed

I have one (big?) restriction with filenames because redmine doesn't allow all chars (space, for example, is replaced with _) and, except this, everything seems to be functional...

I'm making all my tests with macosX (because webdav is natively supported) and I'm looking for a free Webdav client to validate the plugin with Windows. Do you know any freeware for this??

Last thing, I don't know very well ruby and I'm pretty sure that my plugin will need improvements. I will upload it as soon as possible if you are interested but I think that someone with better knowledges will have to check the sources...

Actions #33

Updated by Aleksandar Pavic over 13 years ago

I'll be needing this feature very much, for intranet. If there is any help or testing that you would require, buzz me! Please make plugin multilingual :)

Actions #34

Updated by Pedro Gutierrez over 13 years ago

Hi Arnaud,
I'll check with my collegues whether they know of a freeware client.
If you need beta testers please drop me a message we are really interesting in the thing.


Actions #36

Updated by Arnaud Martel over 13 years ago

Thanks Pedro,

Using this client (Datafreeway), upload doesn't work. Anyway, I have successfully tested WebDrive and MacOSX. It's a good start point!!!

You will find, attached, the first alpha release...

To install:
  • go into your redmine/vendor/plugins directory
  • download redmine_webdav.tar
  • tar xvf redmine_webdav.tar
  • restart your web server
To configure:
  • Open your REDMINE server with your favorite web browser
  • go to "Administration -> Roles and permissions" and assign the "Webdav access" permission to the role(s) you want
  • open a project and check the webdav module from the settings tab
To use it (with MacOSX):


I'm using a "patched" release of REDMINE using apache authentication and I have added the following directives in my .conf file:

<Location /redmine/webdav>
   AuthType Basic
   AuthName REDMINE
   Require valid-user

   PerlAccessHandler Apache::Authn::RedmineAdvanced::access_handler
   PerlAuthenHandler Apache::Authn::RedmineAdvanced::authen_handler
   RedmineDSN "DBI:mysql:database=redmine;host=XXXXXX;port=3306" 
   RedmineDbUser "redmine" 
   RedmineDbPass "XXXXXXX" 
   RedmineAuthenticationOnly "On" 

  Order allow,deny
  Allow from
  Satisfy Any

To provide apache authentication, I modified 2 files:
  • redmine/app/model/user.rb
  • redmine/app/controllers/application_controller.rb

for user.rb, the changes are in the try_to_login method:

  def self.try_to_login(login, password)
    # Make sure no one can sign in with an empty password
    return nil if password.to_s.empty? and password != nil
    user = find(:first, :conditions => ["login=?", login])
    if user
      # user is already in local database
      return nil if !
      if user.auth_source
        # user has an external authentication method
        return nil unless user.auth_source.authenticate(login, password) or password == nil
        # authentication with local password
        return nil unless User.hash_password(password) == user.hashed_password or password == nil
      # user is not yet registered, try to authenticate with available sources
      attrs = AuthSource.authenticate(login, password)
      if attrs
        user = new(*attrs)
        user.login = login
        user.language = Setting.default_language
"User '#{user.login}' created from the LDAP") if logger
    user.update_attribute(:last_login_on, if user && !user.new_record?
  rescue => text
    raise text

for application_controller.rb, changes are in the find_current_user method:

  def find_current_user
    if session[:user_id]
      # existing session
      ([:user_id]) rescue nil)
    elsif cookies[:autologin] && Setting.autologin?
      # auto-login feature starts a new session
      user = User.try_to_autologin(cookies[:autologin])
      session[:user_id] = if user
    elsif params[:format] == 'atom' && params[:key] && accept_key_auth_actions.include?(params[:action])
      # RSS key authentication does not start a session
    elsif request.env['REMOTE_USER']
      myuser = (User.try_to_login(request.env['REMOTE_USER'], nil) rescue nil)
      if myuser
        session[:user_id] =
    elsif Setting.rest_api_enabled? && ['xml', 'json'].include?(params[:format])
      if params[:key].present? && accept_key_auth_actions.include?(params[:action])
        # Use API key
        # HTTP Basic, either username/password or API key/random
        authenticate_with_http_basic do |username, password|
          User.try_to_login(username, password) || User.find_by_api_key(username)

Good luck : you may have to adapt several things... (especially if you don't use apache)

Actions #37

Updated by Arnaud Martel over 13 years ago

Ooops. I made a typo error on a permission name in the previous archive... sorry.

Actions #38

Updated by Arnaud Martel over 13 years ago

And I forget one step in order to install the plugin:
  • sudo gem install unicode
  • sudo gem install shared-mime-info
Actions #39

Updated by Pedro Gutierrez over 13 years ago

Hi Arnaud,
what Redmine version are you using?
Because we're having problems to make your plugin work with version 0.9.2 and are thinking of having a try with 1.0.0

Actions #40

Updated by Xabier Elkano over 13 years ago

Hi Arnaud,

I,ve applied the changes you've detailed. When I access to http://myserver/webdav/projectID/ I get a blank page and the following traces on the log (debug on):

Processing WebdavController#webdav (for at 2010-07-21 12:28:09) [GET]
  Parameters: {"action"=>"webdav", "id"=>"rdm", "controller"=>"webdav", "path_info"=>[]}
  SQL (0.1ms)   SELECT max(`settings`.updated_on) AS max_updated_on FROM `settings`
  User Load (0.1ms)   SELECT * FROM `users` WHERE (`users`.`id` = 4) AND (users.status = 1) AND ( (`users`.`type` = 'User' OR `users`.`type` = 'AnonymousUser' ) )
  Project Load (0.1ms)   SELECT * FROM `projects` WHERE (`projects`.`identifier` = 'rdm') LIMIT 1
  EnabledModule Load (0.1ms)   SELECT name FROM `enabled_modules` WHERE (`enabled_modules`.project_id = 11)
  CACHE (0.0ms)   SELECT * FROM `users` WHERE (`users`.`id` = 4) AND (users.status = 1) AND ( (`users`.`type` = 'User' OR `users`.`type` = 'AnonymousUser' ) )
params[:path_info] = []
Completed in 10ms (View: 1, DB: 0) | 404 Not Found [http://myserver/webdav/projectID/]

"rdm" is my project identifier.
My redmine instance is configured in http://myserver/.

Best Regards.

Actions #41

Updated by Arnaud Martel over 13 years ago

Documentation and sources are available from here and you find useful informations...
I developed the plugin with redmine from trunk r3394 (which is very, very near of 0.9.2) and, now, I'm using r3826 (0.9.5-dev). If you are using 0.9.2, the plugin should work. What are your problems??

It's a normal behavior because you can't test the plugin with your web browser (I see a GET in your log...). To have a valid answer for http://myserver/webdav/projectID, a correct WEBDAV request will use a PROFIND method... If you want to test the plugin, you have to use a WEBDAV client (follow the instructions here if you are using MacOSX or Windows...)

I will release a new version in a couple of days with:
  • repository integration (read/write for subversion with repositories installed on the same server, read-only for all others SCM supported by REDMINE)
  • project settings for the plugin (folder names used, for example)

Don't forget to watch the wiki page if you want to be noticed...

Actions #42

Updated by Xabier Elkano over 13 years ago


now it is working perfect. I'll test it for a while.


Actions #43

Updated by Arnaud Martel over 13 years ago

Release 0.10 of the WEBDAV plugin is out !!!

new: Subversion repositories are now published over WEBDAV...

Actions #44

Updated by Xabier Elkano over 13 years ago

Hi Arnaud,

the plugin is perfect, but I have some problems/suggestions:

- why I can not read through webdav a file if attachment (file) or document (directory) contains an accent like "Instalación.doc"? Redmine handles this situation storaging attachment in md5 form. When attachment is saved in md5 and the file or directory name contains accents the plugin can't read file.

- Is possible to edit attachments through webdav whitout changing the attach id? Is a problem if you have a lot of links refering this attachments.

Thank you very much.

Actions #45

Updated by Arnaud Martel over 13 years ago


- What webdav client are you using? I made tests on macOSX with success (I'm french...) but I know there are some limitations with Microsoft Web folders.
- I'm aware of this limitation but I used redmine core model to have a better compatibility with futures releases ;-(

Actions #46

Updated by Xabier Elkano over 13 years ago


- I've used diferent clients on windows, netdrive and webdrive can be configured to force utf8 and with them there is no problem. With microsoft clients I have different behavior depending on the windows version and I don't know where to configure it and if it is posible to configure. On some Windows XP (I think depending of the .NET framework version) the complete path is sent coded in UTF8 but in some others document/category is sent in UTF8 but the file name is sent in LATIN1. Checking your code I know that I can patch set_path_info method to solve it so there is no problem.

- The problem with the attach id also, I know where can I patch your code to fix it if I need, but is not a big problem at the moment. (I've tested it doing an update diretly "UPDATE attachments SET id=#{} WHERE id=#{}" in write_content_to_path method and it seems to work).

- My big problem is with Microsoft word accessing through Microsoft web folders, I need Word working because is a corporate aplication. OpenOffice works perfectly with microsoft web folders and I know that Word can work too because I've configured an apache dav server and it works perfectly with it. Microsoft Word needs a dav server that supoorts Class 2, first, it requests an OPTIONS method (I've confirmed that the plugin response with class 2 compliant) and then Word requests an LOCK method and if it success it opens document for editing, else it opens as read-only. I've made a lot of tests and I only got documents as read-only with Word. I know that LOCK method is not really implemented on the plugin but I checked the xml response on the plugin and on apache dav server and they seems to be identical but for some reason Word know that something goes wrong and it opens document as read-only... Do you have some ideas? If you need, I can do all the tests to send to you.

Anyway is a great plugin and the last feature I need for redmine. Thanks!

Actions #47

Updated by Terence Mill over 13 years ago

Perfect Job, keep on doing! That is exactly what we needed!


Actions #48

Updated by Arnaud Martel over 13 years ago


- Well, you confirm my opinion about Microsoft Web folders!!! I can make some investigations on this point but, if you have a patch for this, I will integrate it in the plugin with great pleasure...
- I'm currently working too on the MS Office integration and this is my top priority for ths plugin (it is one of the most requested features from my users!!!) So far, I didn't find a solution but I'm pretty optimistic. Next week, I will set up a pure apache dav server and look deeper in the logs to see what are the differences...

Actions #49

Updated by Arnaud Martel over 13 years ago


I found where was the problem and, now, it should be fixed in release 1.1.2 (at least for me with macOSX 10.6 + Office 2008 and Windows XP SP3 + Office 2003). Could you try it and tell me if it's OK for you too ??

Actions #50

Updated by Jose Esteva over 13 years ago

Dear Arnaud Martel,

I need to install your plugin on a Ubuntu 10.04 LTS Server. I followed your instruction step-by-step but I can't make it work. Explicitly, the section 3 (Configure your web server) is not compatible with Ubuntu. Could you help me or say me where may I get more information?

Thank you very much!


Actions #51

Updated by Jose Esteva over 13 years ago

Sorry, I forgot include the error I get:

Internal error

An error occurred on the page you were trying to access.
If you continue to experience problems please contact your redMine administrator for assistance.


Actions #52

Updated by Xabier Elkano over 13 years ago

Arnaud, it works very well, I'm very impressed :-)
I attach you a little patch to work with UTF8 on windows. I've modified some code to get it working but you should check it because I'm very newbie in ruby. I've tested it on windows XP SP3 + Office XP

I have yet two issues:
- With my patch I can read every files on windows but if they have no latin1 characters Office always opens them as read-only. I have not idea why.
- If I rename a folder (document) over webdav with no latin1 characters, on redmine they appear ok and on database is also ok but windows webdav client can not access more to them. In the log appear the following:

Processing ApplicationController#index (for at 2010-08-24 13:37:57) [PROPFIND]
  Parameters: {"propfind"=>{"prop"=>{"getcontentlength"=>nil, "getcontenttype"=>nil, "ishidden"=>nil, "href"=>nil, "name"=>nil, "getlastmodified"=>nil, "isreadonly"=>nil, "displayname"=>nil, "isstructureddocument"=>nil, "contentclass"=>nil, "isroot"=>nil, "creationdate"=>nil, "lastaccessed"=>nil, "getcontentlanguage"=>nil, "defaultdocument"=>nil, "resourcetype"=>nil, "iscollection"=>nil, "parentname"=>nil}, "xmlns"=>"DAV:"}}

ActionController::RoutingError (No route matches "/webdav/prbx/Documentos/prueba instalaci\363n" with {:method=>:propfind}):
  passenger (2.2.7) lib/phusion_passenger/rack/request_handler.rb:95:in `process_request'
  passenger (2.2.7) lib/phusion_passenger/abstract_request_handler.rb:207:in `main_loop'

On apache server doing the same I don't have this issue.


I have it working on Ubuntu.
What webdav client are you using?
What appear on apache log?

Actions #53

Updated by Jose Esteva over 13 years ago


I'm trying to access via http://localhost/redmine/webdav and with the "cadaver" program, getting an "Internal Error" and "404 Not Found Error", respectively.

When I start Apache I get this lines in the error.log:

[Tue Aug 24 10:35:48 2010] [notice] caught SIGTERM, shutting down
[Tue Aug 24 10:35:50 2010] [notice] Apache/2.2.14 (Ubuntu) DAV/2 SVN/1.6.6 Phusion_Passenger/2.2.7 PHP/5.3.2-1ubuntu4 with Suhosin-Patch mod_perl/2.0.4 Perl/v5.10.1 configured -- resuming normal operations

And when I try to write something with "cadaver" I get this lines in the error.log:

[Tue Aug 24 10:48:46 2010] [error] [client] (104)Connection reset by peer: ap_content_length_filter: apr_bucket_read() failed

Thank you very much!

Actions #54

Updated by Arnaud Martel over 13 years ago

It's very difficult for me to reproduce your issues but I think they have both the same origin. I made some tests with french filename (like "C'est un très beau fichier.doc") but I can't reproduce your error and everything is working perfectly!!
Please, could you attach a zip file with some .doc files which produce errors? I will use them to try to improve your patch...

First, could you check the following points:
  • Your REDMINE server works with no errors when you don't use the WEBDAV plugin (especially, your server is correctly set up to use a sub-uri like /redmine. You can look at HowTo_Install_Redmine_in_a_sub-URI for more informations)
  • If you don't use a sub-uri (ie, your REDMINE server url is http://myserver), make changes to my documentation to replace the url to access the WEBDAV plugin (http://myserver/webdav instead of http://myserver/redmine/webdav). In the part 3, you will have also to change "<Location /redmine/webdav>" with "<Location /webdav>"...

Maybe Xabier could give you more informations about the way he has installed and configured my plugin...

Actions #55

Updated by Xabier Elkano over 13 years ago


I am attaching you a zip file with:
  1. The Word document I am using.
  2. Captured transaction between server and client
  3. Redmine debug log when I open the document over Microsoft webdav client.

Also, I have to modify this line because the header If-Modified-Since appear like this:
Wed, 25 Aug 2010 05:53:34 GMT; length=24064

if (Time.httpdate(request.headers["If-Modified-Since"].split(';').first) - Time.httpdate(resource.getlastmodified)) >= -1.1

and I was getting this error:

ArgumentError (not RFC 2616 compliant date: "Wed, 25 Aug 2010 05:53:34 GMT; length=24064"):
  /usr/lib/ruby/1.8/time.rb:337:in `httpdate'



If you have redmine working ok, you have to follow this guide.
I've tested it with cadaver and it works ok. If you can not get it working check apache and redmine logs again. I can't see any significant information in your logs.

Actions #56

Updated by Jose Esteva over 13 years ago

OK, than you very much!

Actions #57

Updated by Jose Esteva over 13 years ago


I think I find where the error is, but honestly I know very little about Ruby and Rails.

Railsdav::UnknownWebDavMethodError (Railsdav::UnknownWebDavMethodError):
/usr/lib/ruby/1.8/phusion_passenger/rack/request_handler.rb:95:in `process_request'
/usr/lib/ruby/1.8/phusion_passenger/abstract_request_handler.rb:207:in `main_loop'
/usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:374:in `start_request_handler'
/usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:332:in `handle_spawn_application'
/usr/lib/ruby/1.8/phusion_passenger/utils.rb:184:in `safe_fork'
/usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:330:in `handle_spawn_application'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `__send__'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `main_loop'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:196:in `start_synchronously'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:163:in `start'
/usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:209:in `start'
/usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:262:in `spawn_rails_application'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:126:in `lookup_or_add'
/usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:256:in `spawn_rails_application'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:80:in `synchronize'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
/usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:255:in `spawn_rails_application'
/usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:154:in `spawn_application'
/usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:287:in `handle_spawn_application'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `__send__'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `main_loop'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:196:in `start_synchronously'


Actions #58

Updated by Arnaud Martel over 13 years ago

New release of the plugin is available (see PluginWebDav for more details)

Thank's a lot for your files. They help me to find several bugs but I didn't include your patch related to WINDOWS encoding (I've got big troubles with it on my windows version...).
All the url in the plugin responses are now encoded and it seems to correct all the multi-bytes errors I had. Hope it will be the same for you...

For information, I attached the extract of my apache log when I open your doc from Word, then save it:

apache access_log will be more helpful to analyze what's wrong and we need more details about your configuration. Could you explain precisely what you've done when you installed the plugin and send requested informations described in Submitting a Bug

Actions #59

Updated by Xabier Elkano about 13 years ago


I've been testing your last version in several machines with windows XP and it works very well. I only have errors on my machine. I think because I installed this microsoft patch Webfldrs-KB907306-ESN.exe and in the others machines is not installed.

I'll be waiting for LOCK implementation ;-)


Actions #60

Updated by Arnaud Martel about 13 years ago

Xabier Elkano wrote:

I'll be waiting for LOCK implementation ;-)

Do you still have troubles when trying to edit WORD files (it should be OK now) or do you mean "a real lock management" (to share file access between several users at the same time...) ?? I know that this last feature would be very useful but it is a huge work and I'm not sure to have enough time to develop it :-(

I'm going to install the Microsoft patch to see if something goes wrong with it...

Actions #61

Updated by Xabier Elkano about 13 years ago

I have troubles only on my PC, but on other PCs with Windows XP SP3 + Office XP it works Ok. I don't know how to fix it on my PC, I think something I've installed, may be the microsoft patch, but I'm not sure.

Yes, I mean a real lock management to allow access to multiple users for editing whitout overwriting problems :-)

Actions #62

Updated by Terence Mill about 13 years ago


Actions #63

Updated by Xabier Elkano about 13 years ago


I've written a little patch to implement locks on your webdav plugin. It is a very simple implementation with only exclusive locks but it is all I need. If user1 gets a LOCK for a document, user2 can't get LOCK for same resource until user1 releases the LOCK.

I'm not sure if it is completely compliant with RFC4918, but with Office works OK.

I've tested it only on windows XP + Office XP.

If you want use or improve it, here you have

Actions #64

Updated by Arnaud Martel about 13 years ago


Nice job!! I just made a quick review of your patch and I like it. I will test it with MacOSX as soon as possible (I'm currently very busy but I hope to have enough time next week to apply your patch on trunk)

Actions #65

Updated by Arnaud Martel about 13 years ago

Tests are done and I just commited your patch with one minor change (I had trouble within Office on MacOS).

def webdav_put
  if Lock.exists?( :resource=>request.url )
    if not Lock.exists?( :resource=>request.url, :owner=>User.current.login )
       raise ForbiddenError

  write_content_to_path(@path_info, request.raw_post)
  render :nothing => true, :status => 201

Thanks for your contribution

Actions #66

Updated by Terence Mill about 13 years ago

Sounds really as a great feature to us. We have some questions , we didn't get answered completly by the docs and messages we found.

Here the questions (Maybe it would be usefull to add them later in a Plugin-Site FAQ Section ?) :

  1. I this the same or realted to plugin PluginWebDav ?
  2. Is it possible only to allow webdav access to files and docs but not to svn?
  3. Does files automatically get listed in redmines html files view if i add them to files section via webdav ?
  4. Does documents automatically get listed in redmines html docs view if i add new folder and files in it via webdav ?
  5. What happens i add same files ( for section files & docs) twice? Will it be overidden, or is it possible to have same file twice with same name?
  6. What happens i add same files ( for svn section ) twice? Will it be overidden, or will it get a new version?
  7. What affects doess the http_auth fix have for the regular redmine authentification? We already use advanved svn integration with ldap support for svn and redmine - are there any restrictions to that if i use this webdav extension?

Tx for support.

Actions #67

Updated by Arnaud Martel about 13 years ago


  1. Yes. It is the same
  2. Yes (using project's settings)
  3. Yes
  4. Yes
  5. It will be overidden
  6. You will have a new version (each file create/update/delete will cause a new subversion commit)
  7. When you are using an HTTP authentication (with and apache, for example), the web server will populate the REMOTE_USER variable with the login name of the authenticated user. Http_auth just trusts this variable and authenticate you inside REDMINE as this user (without displaying the login form...). That's all... If you don't use http_auth, the webdav plugin will not know who is the current user. Last thing to know: if you use (instead of, you may have troubles because will try to check access using "commit" and "browse repository" permissions only...

Hope it will help you...


Actions #68

Updated by Terence Mill about 13 years ago

Tx for your reply!.
I forgot some questions.

  1. What will happen if i create folders in files section and..
  2. ...what will happen if i create folders and subfolders with depth >1 - i mean how can redmine list handle folder structures which wouldn't be possible if upload anf file structure is validated/created by regular redmine ui?
  3. Will the upload file size restrictions from admin settings for files and folders still apply? With webdav in windows explorer it is even more easy for the user to drag'n drop some GB in should be carefully controlled by size limits.
  4. Will i still see who uploaded the files?
  5. We would like to use an external svn repo via https for source code only an have an "local" (same server) svn repo to save other projects documents mostly used by non technical roles. So we would like to have the webdav plugin to use some local dir as svn repo root different from the http svn path configured for redmine project settings. Would that be possible? Then we coold complety deactivate redmines files and docs menu and only use this projects non source code svn via webdav. THis way we finally have files managment with versioning but useable for non technical experiences via windows explorer.
Actions #69

Updated by Arnaud Martel about 13 years ago


  1. You can't. I didn't want to create versions this way and I wanted to use the redmine model...
  2. same answer.
  3. good question. I should respect the file size restriction (as I use the REDMINE attachment objects) but I didn't make any test to confirm this point...
  4. Yes. In fact, there is absolutely no differences between using REDMINE or WEBDAV. Objects are created the same way, with the same attributes...
  5. I'm not sure to really understand you question. If you ask if you can have subversion repository for your sources and, in the same project, use the webdav plugin with another subversion repository, then the answer is NO. Webdav plugin is using REDMINE functions for all read operations in the repository (based on the project's repository settings). For write operations, webdav plugin will add new functions in REDMINE libraries (right now, only for subversion and filesystem repos...).
In my company, I use 2 templates for my projects. One is for development projects with the following modules:
  • issue tracking (with gantt & calendar)
  • news
  • files
  • documents
  • wiki
  • repository (subversion)
  • FAQ
  • Doodles
  • Wiki extensions
The second is for non-technical projects with the following modules:
  • issue tracking (with gantt & calendar)
  • wiki
  • repository (filesystem or subversion, depending if versioning is needed)
  • Doodles
  • Wiki extensions
  • Webdav
  • BigBlueButton (for web conferences)

I used 2 different templates not only for the choice of the modules but mainly because permissions are not the same...

Actions #70

Updated by Terence Mill about 13 years ago

Great facts for 1. ,2. and 4. If you have tested 3, would you provide results please?
Sadly 5. isn't possible. If it was i think for many users it would solve the following requirements.

Have two "file stores". One for developers with interface and clients from standard scm (whatever it is and configured in redmine) and one for non technical users (eg. business analysts, project manager, customer) which don't have to install something and can use "standard" (i mean additionally ur webdav extension) redmine web interface or regular folders in their os (windows, mac, -- whatever). THe non technical users still can have versioning , because in the background it is used a regular Subversion repository. Furthermore you have a "own" repository which you cann let anyone access (read or write) but still can't see the source code, which is kept in a separate repository. For standard redmine rights and role managment (read and/or write rights for complete repository) this will fit also.

Let me guess you could configure your webdav plugin to define the svn root path per project (don't matter if file:// or http:// ) so that one could either choose same svn root, as defined in redmine project project acrhiv, or take a another path, so this would result in "two" repositories. For the second one you could have an own tab which would use same functionality as already implemented in redmine but shows another svn repo.

If that would work, we won't use files&docs anymore and take the second repo with webdavn interface for non technical users to manage their docs. Thsi way we would use a standard scm for DMS with webdav interface and seperate source code from other docs in storeage and accessing roles.

Just an idea, which can solve sam discussions around the topcis #991, #3071, #3995, #2555, #1196 and design discussion here

Actions #71

Updated by Arnaud Martel about 13 years ago


Well, I don't think that it will be easy to configure the WebDav plugin to use another repository but maybe someone could adapt my sources to do that. Sorry for this answer but I'm currently very busy with some others modules that I just developed for my company and this is not a feature we need for now...


Actions #72

Updated by Peter Philipp about 13 years ago


First I've to say, I love your plug-in. :)
It was quite hard work to get it installed on my opensuse server but it works now.
Unfortunately I get an error whenever accessing /webdav/project/files - the log on the webserver says this:

 Processing WebdavController#webdav (for at 2010-10-23 00:18:44) [PROPFIND]
   Parameters: {"action"=>"webdav", "id"=>"eurocentres20-int", "controller"=>"webdav", "path_info"=> ["files"], "propfind"=>{"prop"=>{"getcontentlength"=>{"xmlns"=>"DAV:"}, "getlastmodified"=>{"xmlns"=>"DAV:"}, "creationdate"=>{"xmlns"=>"DAV:"}, "lastaccessed"=>{"xmlns"=>"DAV:"}, "resourcetype"=>{"xmlns"=>"DAV:"}}, "xmlns"=>"DAV:"}}

 NoMethodError (undefined method `filename' for nil:NilClass):
  passenger (2.2.13) lib/phusion_passenger/rack/request_handler.rb:92:in `process_request'
  passenger (2.2.13) lib/phusion_passenger/abstract_request_handler.rb:207:in `main_loop'
  passenger (2.2.13) lib/phusion_passenger/abstract_server.rb:352:in `main_loop'
  passenger (2.2.13) lib/phusion_passenger/abstract_server.rb:196:in `start_synchronously'

In /webdav/project/documents/ticket/ it works like a charm. Any clue what could go wrong?

I use NetDrive on Win7, to access the service. (Native Win7 WebDav doesn't work- I guess it's the self-signed certificate that makes trouble)


Actions #73

Updated by Arnaud Martel about 13 years ago


Strange!! It seems that the webdav plugin is unable to list your files and versions. My first idea is that it may be caused by a specific filename (I had troubles with extended and special chars). Please, could you attach a screenshot of your FILES tab (in your REDMINE project). This will allow me to see the files and versions you have and help me to understand why Webdav fails...


Actions #74

Updated by Jean-Philippe Lang about 13 years ago

Please, use the Plugins forum to track this plugin development.

Actions #75

Updated by Peter Philipp about 13 years ago


Thank you for your fast feedback - appreciate that very much!
Frankly speaking I've no clue of Ruby (I'm a php guy ;) ) - nevertheless I started to debug.
Attached you'll find:
  • Network trace - seems to be ok
  • Screenshot of the filelist - nothing special in there
  • DB entry of the attachement - looks fine too
  • redmine log with level to debug - last queries before error.

I think I located the error in the file file_resource.rb on line 207


If I put in a "LOG" before and after @file.filename, just the first is logged before I get the error.

Thank you in advance

Actions #76

Updated by Terence Mill about 13 years ago

Peter Philipp Would you please provide an installation path for redmine(open)suse, cause its quite not documented at the moment, and i would be very thankful also.

Actions #77

Updated by Arnaud Martel about 13 years ago

As JP Lang suggests, discussion has been moved to Forum -> Plugins -> Webdav plugin

Please, don't use this issue anymore...

Actions #78

Updated by puneeth kumar over 12 years ago

i am facing problem in windows, actually i am confused with the configuration setting in windows please please anyone help me out, i need this plugin

Actions #79

Updated by Lu Pon almost 11 years ago


Actions #80

Updated by Jan Niggemann ( team member) about 10 years ago

  • Status changed from New to Closed
I'm closing this very old issue, because

Also available in: Atom PDF