Feature #801
closedWebDAV access to Documents/Files
0%
Description
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?
Files
Related issues
Updated by Stephanie Collett about 16 years ago
+1 This is needed in our organization. Anybody still interested in this?
Updated by Nicolas Chuche about 16 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 ?
Updated by Brian Lopez about 16 years ago
Here's a few I was able to pull up relatively quickly:
- railsdav - http://www.liverail.net/railsdav and also http://github.com/stueccles/railsdav/tree/master
- mongrel-webdav-handler - http://github.com/jwilger/mongrel-webdav-handler/tree/master
- this one is probably less useful unless you force the use of mongrel (?)
- webrick-webdav - http://redhanded.hobix.com/inspect/webrickWebdavHandlerSafelyExtractedFromTheWild.html
- again, this one may not make much sense as it appears to be for stand-alone purposes. but perhaps some bored coder could use it's source as inspiration ;)
I can't honestly stand behind either of these solutions, because I've never used them.
Updated by Nicolas Chuche about 16 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.
Updated by Alexey Lustin almost 16 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
Updated by Oleg Lozinskij over 15 years ago
Is there any progress on this ticket?
Updated by Brian Lopez over 15 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: http://github.com/georgi/rack_dav/tree/master - "WEBDAV Handler for Rack"
Updated by Oleg Lozinskij over 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?
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 : )
Updated by Scott Duensing over 15 years ago
+1 at least. This would be an awesome feature that would save me a lot of trouble!
Updated by Pedro Gutierrez almost 15 years ago
+1
I agree. Webdav access to the documents would enhance the collaboration features of Redmine
Updated by Dave Lowndes almost 15 years ago
+1, I'd also suggest the team add the voting plugin to this project :)
Updated by Pedro Salido López almost 15 years ago
+1, Sería muy útil poder disponer de una pestaña para integrar cada proyecto con un gestor documental mediante WebDAV
Updated by Carl Pef over 14 years ago
+1 yeah, it would be great !
Keep up the good work, guys
(And thanks for your hard work)
Updated by Wim Gillis over 14 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 forapp/models/attachment.rb
, that will change attachment location tofiles/<project-identifier>
, and create the dir when needed45,46d44 < cattr_accessor :storage_path < @@storage_path = "#{RAILS_ROOT}/files" 78a77,79 > if not File.directory? storage_path > Dir.mkdir storage_path > end 101c102 < "#{@@storage_path}/#{self.disk_filename}" --- > "#{self.storage_path}/#{self.disk_filename}" 103a105,108 > 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 Redmine.pm 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=127.0.0.1" RedmineDbUser "redminedbuser" RedmineDbPass "redminedbpass" Require valid-user </Location> ...
- in Redmine.pm, 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; } } $sth->finish(); undef $sth; $dbh->disconnect(); 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.
Updated by Arnaud Martel over 14 years ago
- 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
- title for document1
- files
- file1 (with no version)
- file2 (with no version)
- version1
- file1
- file2
- version2
- file1
- file2
- documents
- 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...
Updated by Aleksandar Pavic over 14 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 :)
Updated by Pedro Gutierrez over 14 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.
Thanks.
Updated by Pedro Gutierrez over 14 years ago
Hi Arnaud,
check this client http://enginsite.com/ssh-webdav-ftp-sftp-client.htm
BR
Updated by Arnaud Martel over 14 years ago
- File redmine_webdav.tar redmine_webdav.tar added
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
- 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
- Open the finder
- Go to -> Connect to server...
- enter http://myserver/redmine/webdav as the server uri, assuming that you are accessing redmine using a sub-uri as I do (http://myserver/redmine)
- enter yours credentials (login/password)
- you're in !!!
notes¶
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 127.0.0.1 Satisfy Any </Location>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 !user.active? if user.auth_source # user has an external authentication method return nil unless user.auth_source.authenticate(login, password) or password == nil else # authentication with local password return nil unless User.hash_password(password) == user.hashed_password or password == nil end else # 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 if user.save user.reload logger.info("User '#{user.login}' created from the LDAP") if logger end end end user.update_attribute(:last_login_on, Time.now) if user && !user.new_record? user rescue => text raise text end
for application_controller.rb, changes are in the find_current_user method:
def find_current_user if session[:user_id] # existing session (User.active.find(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] = user.id if user user elsif params[:format] == 'atom' && params[:key] && accept_key_auth_actions.include?(params[:action]) # RSS key authentication does not start a session User.find_by_rss_key(params[:key]) elsif request.env['REMOTE_USER'] myuser = (User.try_to_login(request.env['REMOTE_USER'], nil) rescue nil) if myuser session[:user_id] = myuser.id end myuser elsif Setting.rest_api_enabled? && ['xml', 'json'].include?(params[:format]) if params[:key].present? && accept_key_auth_actions.include?(params[:action]) # Use API key User.find_by_api_key(params[:key]) else # 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) end end end end
Good luck : you may have to adapt several things... (especially if you don't use apache)
Updated by Arnaud Martel over 14 years ago
- File redmine_webdav.tar redmine_webdav.tar added
Ooops. I made a typo error on a permission name in the previous archive... sorry.
Updated by Arnaud Martel over 14 years ago
- sudo gem install unicode
- sudo gem install shared-mime-info
Updated by Pedro Gutierrez over 14 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
Updated by Xabier Elkano over 14 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 192.168.119.76 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] = [] CONVERTED: 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.
Updated by Arnaud Martel over 14 years ago
Pedro,
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??
Xavier,
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...)
- 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...
Updated by Xabier Elkano over 14 years ago
Arnaud,
now it is working perfect. I'll test it for a while.
Thanks!
Updated by Arnaud Martel over 14 years ago
Release 0.10 of the WEBDAV plugin is out !!!
new: Subversion repositories are now published over WEBDAV...
Updated by Xabier Elkano over 14 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.
Updated by Arnaud Martel over 14 years ago
Xabier,
- 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 ;-(
Updated by Xabier Elkano over 14 years ago
Arnaud,
- 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=#{file.id} WHERE id=#{a.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!
Updated by Terence Mill over 14 years ago
Perfect Job, keep on doing! That is exactly what we needed!
+100
Updated by Arnaud Martel over 14 years ago
Xabier,
- 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...
Updated by Arnaud Martel over 14 years ago
Xabier,
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 ??
Updated by Jose Esteva over 14 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!
JAER
Updated by Jose Esteva over 14 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.
Thanks
Updated by Xabier Elkano over 14 years ago
- File webdav-xp.patch webdav-xp.patch added
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 192.168.119.76 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.
Jose,
I have it working on Ubuntu.
What webdav client are you using?
What appear on apache log?
Updated by Jose Esteva over 14 years ago
Xabier,
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 192.168.50.230] (104)Connection reset by peer: ap_content_length_filter: apr_bucket_read() failed
Thank you very much!
Updated by Arnaud Martel over 14 years ago
Xabier,
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...
Updated by Xabier Elkano over 14 years ago
- File webdav.zip webdav.zip added
Arnaud,
I am attaching you a zip file with:- The Word document I am using.
- Captured transaction between server and client
- 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'
Thanks.
Jose,
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.
Updated by Jose Esteva over 14 years ago
Arnaud,
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'
/usr/lib/phusion_passenger/passenger-spawn-server:61
Jose
Updated by Arnaud Martel over 14 years ago
New release of the plugin is available (see PluginWebDav for more details)
Xabier,
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:
Jose,
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
Updated by Xabier Elkano over 14 years ago
Arnaud,
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 ;-)
Thanks
Updated by Arnaud Martel over 14 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...
Updated by Xabier Elkano over 14 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 :-)
Updated by Xabier Elkano about 14 years ago
- File webdav-locks.patch webdav-locks.patch added
Aranaud,
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
Updated by Arnaud Martel about 14 years ago
Xabier,
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)
Updated by Arnaud Martel about 14 years ago
Xabier,
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 end end check_write(@path_info) write_content_to_path(@path_info, request.raw_post) render :nothing => true, :status => 201 end
Thanks for your contribution
Updated by Terence Mill about 14 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 ?) :
- I this the same or realted to plugin PluginWebDav ?
- Is it possible only to allow webdav access to files and docs but not to svn?
- Does files automatically get listed in redmines html files view if i add them to files section via webdav ?
- Does documents automatically get listed in redmines html docs view if i add new folder and files in it via webdav ?
- 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?
- What happens i add same files ( for svn section ) twice? Will it be overidden, or will it get a new version?
- 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.
Updated by Arnaud Martel about 14 years ago
Terence,
- Yes. It is the same
- Yes (using project's settings)
- Yes
- Yes
- It will be overidden
- You will have a new version (each file create/update/delete will cause a new subversion commit)
- When you are using an HTTP authentication (with redmine.pm 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 redmine.pm (instead of RedmineAdvanced.pm), you may have troubles because redmine.pm will try to check access using "commit" and "browse repository" permissions only...
Hope it will help you...
Arnaud
Updated by Terence Mill about 14 years ago
Tx for your reply!.
I forgot some questions.
- What will happen if i create folders in files section and..
- ...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?
- 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 explorer..it should be carefully controlled by size limits.
- Will i still see who uploaded the files?
- 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.
Updated by Arnaud Martel about 14 years ago
Terence,
- You can't. I didn't want to create versions this way and I wanted to use the redmine model...
- same answer.
- 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...
- Yes. In fact, there is absolutely no differences between using REDMINE or WEBDAV. Objects are created the same way, with the same attributes...
- 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...).
- issue tracking (with gantt & calendar)
- news
- files
- documents
- wiki
- repository (subversion)
- FAQ
- Doodles
- Wiki extensions
- 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...
Updated by Terence Mill about 14 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
Updated by Arnaud Martel about 14 years ago
Terence,
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...
Arnaud
Updated by Peter Philipp about 14 years ago
Arnaud,
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 188.61.214.159 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)
Cheers,
Peter
Updated by Arnaud Martel about 14 years ago
Peter,
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...
Arnaud
Updated by Jean-Philippe Lang about 14 years ago
Please, use the Plugins forum to track this plugin development.
Updated by Peter Philipp about 14 years ago
Arnaud,
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
else @file.filename end
If I put in a RAILS_DEFAULT_LOGGER.info "LOG"
before and after @file.filename
, just the first is logged before I get the error.
Thank you in advance
Peter
Updated by Terence Mill about 14 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.
Updated by Arnaud Martel about 14 years ago
As JP Lang suggests, discussion has been moved to Forum -> Plugins -> Webdav plugin
Please, don't use this issue anymore...
Updated by puneeth kumar over 13 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
Updated by Jan Niggemann (redmine.org team member) over 11 years ago
- Status changed from New to Closed
- DMSF (http://www.redmine.org/plugins/dmsf) has WebDAV functionality
- This issue is mis-used as a forum