Project

General

Profile

Webdav plugin

Added by Arnaud Martel almost 14 years ago

Questions & problems related to webdav plugin


Replies (90)

RE: Webdav plugin - Added by Pedro Gutierrez almost 14 years ago

A question regarding the functionality of the plugin.

I can't drag a file from my desktop to a webdav (mapped) folder.
  • Am I trying to do something that is not part of the expected functionality of the plugin?
  • Is it a problem of my webdav client (I'm using windows XP standard client)?

RE: Webdav plugin - Added by Pedro Gutierrez almost 14 years ago

See attached the spanish translation of the plugin literals for Arnaud to consider its uploading to Github

es.yml (776 Bytes) es.yml

RE: Webdav plugin - Added by Sergei Korobochkin almost 14 years ago

is it possible to add access to attachments in issues and wiki, similar to the documents?

like

  • Files
  • Attachments 1
  • Attachments 2
  • Attachments #
  • Documents
  • Document name
  • Attachments 1
  • Attachments 2
  • Attachments #
  • Issues
  • #ticket
  • Attachments 1
  • Attachments 2
  • Wiki
  • Page name
  • Attachments 1
  • Attachments 2
  • Attachments #

it would be great, thanks

RE: Webdav plugin - Added by Arnaud Martel almost 14 years ago

Pedro,

Drag&Drop should work (I use it everyday...).
You're trying to upload a file in what kind of container (files, documents or repository)?
If it a repository, I just fixed a bug that occurs when the project is associated with a sub-directory of a subversion repository so you should try with the last release (0.2.1)
If it is a file under a version, or a document, check that the associated directory has a valid name for your OS (the plugin is using the version's name and the document's title as directory name and there may be some invalid chars...)

Kind regards,

Arnaud

PS: I have commited your locale file. thank's!!

RE: Webdav plugin - Added by Arnaud Martel almost 14 years ago

Sergei,

You're not the first one to ask for this new feature but, as I said before, I didn't include the feature in the plugin because:
  • I don't need it in my company
  • It may generate a lot of emails (notifications are sent to assigner AND all watchers each time a file will be saved or deleted)
  • There may be some performance troubles when having a lot of issues (and I have several hundred of issues is some projects...)

I think it will be a hard work to implement this feature and, currently, I don't have enough free time. Of course, you're welcome if you want to make these enhancements and I will be very glad to push any contribution in the trunk.

Kind regards,

Arnaud

RE: Webdav plugin - Added by Hansen Ler almost 14 years ago

Hi,

I suppose this is a good plugin. However, I'm unable to setup this Webdav on my Redmine Project:

I'm using Windows + Redmine + mongrel as a service.

I've modified the Wiki for Windows XP configuration:

1. Run Command Prompt > cd C:\redmine
ruby script/plugin install http://github.com/AdamLantos/redmine_http_auth.git
ruby script/plugin install http://github.com/amartel/redmine_webdav.git
rake db:migrate_plugins RAILS_ENV=production

2.
gem install unicode
gem install shared-mime-info

3. *I do not use Apache, so I skipped step 3.

4. Restart the Windows Service from services.msc
5. Both plug-ins found. No problem.
6. Go to Administration > Roles and Permissions > Developer >
- Use WEBDAV > Checked
- Manage WEBDAV > Checked
Go to Projects > My Project > Settings
- Modules > Webdav > Checked
- Members > User > Developer

Question: Do I create a folder in C:\Redmine\webdav ? I've created and it doesn't work!

RE: Webdav plugin - Added by Arnaud Martel almost 14 years ago

I don't use mongrel but I think you need to adapt step 3 for your environment.
Webdav requests absolutely need that your REDMINE server supports basic HTTP authentication. I don't know if mongrel, without apache, is able to do it...

Kind regards,

Arnaud

RE: Webdav plugin - Added by Terence Mill almost 14 years ago

Wer are using Redmine.pm for adavanced Subversion integration and ldap described here. Does anyone made it from there to a working webdav integration?
We would be glad about a working config desciption for this case, or a migration description towards RedmineAvaanced.pm.

Tx a lot!

RE: Webdav plugin - Added by Terence Mill almost 14 years ago

Terence Mill wrote:

Wer are using Redmine.pm for adavanced Subversion integration and ldap described here. Does anyone made it from there to a working webdav integration?
We would be glad about a working config desciption for this case, or a migration description towards RedmineAvaanced.pm.

Tx a lot!

Forget to say we are using apache 2 and passenger. Our /etc/apache2/sites-available/redmine-ssl looks like that.

    PerlLoadModule Apache::Redmine
    PerlLoadModule Authen::Simple::LDAP
#    PerlLoadModule  IO::Socket::SSL
    <Location /svn>
        DAV svn
        SVNParentPath "/var/svn" 
        # The SVNPathAuthz directive is "on" by default. When set "off", all path-based authorization checking is disabled; mod_dav_svn stops invoking authorization checks on every path it discovers.
        SVNPathAuthz off

        Order deny,allow
        Deny from all
        Satisfy any             

        PerlAccessHandler Apache::Authn::Redmine::access_handler
        PerlAuthenHandler Apache::Authn::Redmine::authen_handler

        AuthType Basic
        AuthName "- repo Redmine SVN Repository -" 
        Require valid-user

        ## for mysql
        RedmineDSN "DBI:mysql:database=redmine;host=localhost" 
        RedmineDbUser "reduser" 
        RedmineDbPass "xxxxxxxxxxxxxx" 

                ## http://www.redmine.org/boards/1/topics/9610?r=9742#message-9742 
        RedmineCacheCredsMax "50" 
    </Location>
    ErrorLog /var/log/apache2/redmine-error.log
       CustomLog /var/log/apache2/redmine-access.log combined

RE: Webdav plugin - Added by Arnaud Martel almost 14 years ago

Terence,

I don't think that Redmine.pm will work with webdav plugin. The reason is that Redmine.pm checks only :browse_repository and :commit_repository permissions and the url's parsing (to identify the project) is dedicated to SVN...

You can use RedmineAdvanced.pm just for WebDAV access and keep your current subversion integration with Redmine.pm (if you don't want to migrate your current configuration)

Assuming you are using RHEL5/CentOS5 and REDMINE is installed in a sub-uri (/redmine):

  • Copy RedmineAdvanced.pm in /etc/httpd/Apache/Authn
  • Create the file /etc/httpd/conf.d/redmine_webdav.conf
<Location /redmine/webdav>
AuthType Basic
AuthName "- WebDAV Redmine access -" 
Require valid-user
PerlAccessHandler Apache::Authn::RedmineAdvanced::access_handler
PerlAuthenHandler Apache::Authn::RedmineAdvanced::authen_handler
RedmineDSN “DBI:mysql:database=redmine;host=localhost”
RedmineDbUser “reduser”
RedmineDbPass “xxxxxxxxxxxxxx”
RedmineAuthenticationOnly “On”
</Location>
  • Restart apache (/etc/init.d/httpd restart)

If REDMINE is not installed in a sub-uri, replace

<Location /redmine/webdav>

with
<Location /webdav>

The setting RedmineAuthenticationOnly “On” will instruct RedmineAdvanced.pm to just check the login/password (and not permissions). Permissions will be checked by the webdav plugin...

Kind regards,

Arnaud

RE: Webdav plugin - Added by Sergei Korobochkin almost 14 years ago

added support for issues and wiki
Beta version
There are some problems, not always correctly work out the mapping issues, working on it
feature, creating a folder in the wiki - wiki pages are automatically created

  • Issues
  • * subject
  • * * Attachments 1
  • * * Attachments 2
  • Wiki
  • * Page name
  • * * Attachments 1
  • * * Attachments 2
  • * * Attachments #

RE: Webdav plugin - Added by Terence Mill almost 14 years ago

Arnaud Martel wrote:

Terence,

I don't think that Redmine.pm will work with webdav plugin. The reason is that Redmine.pm checks only :browse_repository and :commit_repository permissions and the url's parsing (to identify the project) is dedicated to SVN...

You can use RedmineAdvanced.pm just for WebDAV access and keep your current subversion integration with Redmine.pm (if you don't want to migrate your current configuration)

Assuming you are using RHEL5/CentOS5 and REDMINE is installed in a sub-uri (/redmine):

  • Copy RedmineAdvanced.pm in /etc/httpd/Apache/Authn
  • Create the file /etc/httpd/conf.d/redmine_webdav.conf

[...]

  • Restart apache (/etc/init.d/httpd restart)

If REDMINE is not installed in a sub-uri, replace
[...]
with
[...]

The setting RedmineAuthenticationOnly “On” will instruct RedmineAdvanced.pm to just check the login/password (and not permissions). Permissions will be checked by the webdav plugin...

I installed like you said, but my apache conf looks a bit different on debian, so installed RedmineAdvanced.pm the same way as i installed svn integration with Redmine.pm
i copied RedmineAdvanced.pm to folder "/usr/local/lib/redmine-trunk/extra/webdav/" and made a symlink at "/usr/lib/perl5/Apache/RedmineAdvanced.pm" to "/usr/local/lib/redmine-trunk/extra/webdav/RedmineAdvanced.pm". I added the new <location..> to my exitsing apache httpdconf at "/etc/apache2/sites-enabled/210-redmine-ssl"

<VirtualHost *:443>
    SSLEngine On
      SSLCertificateFile /SSL/repo.crt
      SSLCertificateKeyFile /SSL/repo.key

    RewriteEngine On

    # Umleiten zu Nexus
    RewriteCond %{REQUEST_URI} ^/nexus.* [OR]
    RewriteCond %{REQUEST_URI} ^/webchat.*
    RewriteCond %{SERVER_PORT}   ^443$
    RewriteRule  (.*)  https://%{HTTP_HOST}:444$1   [L] 

    RewriteCond %{REQUEST_URI} ^/account/register.* [NC]
    RewriteRule ^(.*)$ / [R=302,NC,L]

    ServerName repo.intra.loc
    ServerAlias repo.intra.loc

    DocumentRoot /redmine/public
    #PassengerAppRoot /redmine
        <Directory /redmine/public>
           AllowOverride None
        Options Indexes ExecCGI FollowSymLinks
              Order allow,deny
              Allow from all
              #AllowOverride all
        </Directory>

    ## protect the redmine-Webservice
       <Location /sys>
              Order deny,allow
              Deny from all
              Allow from 127.0.0.1
        Allow from localhost
        </Location>

    PerlLoadModule Apache::Redmine
    PerlLoadModule Authen::Simple::LDAP
    <Location /svn>
        DAV svn
        SVNParentPath "/var/svn" 
        # The SVNPathAuthz directive is "on" by default. When set "off", all path-based authorization checking is disabled; mod_dav_svn stops invoking authorization checks on every path it discovers.
        SVNPathAuthz off

        Order deny,allow
        Deny from all
        Satisfy any             

        PerlAccessHandler Apache::Authn::Redmine::access_handler
        PerlAuthenHandler Apache::Authn::Redmine::authen_handler

        AuthType Basic
        AuthName "- Redmine SVN Repository -" 
        Require valid-user

        ## for mysql
        RedmineDSN "DBI:mysql:database=redmine;host=localhost" 
        RedmineDbUser "red" 
        RedmineDbPass "*******" 
        RedmineCacheCredsMax "50" 
    </Location>

    ## http://www.redmine.org/boards/3/topics/18513?r=20366#message-20366
    <Location /webdav>
        AuthType Basic
        AuthName "- WebDAV Redmine access -" 
        Require valid-user
        PerlAccessHandler Apache::Authn::RedmineAdvanced::access_handler
        PerlAuthenHandler Apache::Authn::RedmineAdvanced::authen_handler
        RedmineDSN "DBI:mysql:database=redmine;host=localhost" 
        RedmineDbUser "red" 
        RedmineDbPass "*******" 
        RedmineAuthenticationOnly "On" 
    </Location>

When restarting apache i get the following error:

Syntax error on line 90 of /etc/apache2/sites-enabled/210-redmine-ssl:
Invalid command 'RedmineAuthenticationOnly', perhaps misspelled or defined by a module not included in the server configuration

Pleaze help!

RE: Webdav plugin - Added by Arnaud Martel almost 14 years ago

Terence,

You need to load the module with:
PerlLoadModule Apache::RedmineAdvanced

But I hope that apache will be able to manage the directives defined in both modules (it should but I never tested...)

RE: Webdav plugin - Added by Terence Mill almost 14 years ago

i changed the cfg to

 PerlAccessHandler Apache::RedmineAdvanced::access_handler
 PerlAuthenHandler Apache::RedmineAdvanced::authen_handler

But still the same error.

Btw. the RedmineAdvanced.pm is defined in package
Apache::Authn::RedmineAdvanced;

RE: Webdav plugin - Added by Terence Mill almost 14 years ago

Sry.. such a foo .. i think got it..

RE: Webdav plugin - Added by Terence Mill almost 14 years ago

Its working! Tx alot!

RE: Webdav plugin - Added by Terence Mill almost 14 years ago

Why isn't it possible (in general) to create subfolder structure in documents?
We have SVN hooks which forbid checking without comment, seems as this is a problem with webdav, because comments are not possible, are they? Is thete any woraround or a special hook to keet this restriction about comments?

Where can i enabled read only access to svn via webdav?

Would be nice if the changes on documents get listed in Activity bar the same way as its done via the web interface.
The error messages should be more epressive. eg. if i try to checking a 2nd Level subfolder the error message could be "only one level folder tree structure is allowed".

RE: Webdav plugin - Added by Terence Mill almost 14 years ago

Would be nice if you couldlocalize default Folder labels also!

webdav_settings.rb

      setting.files_label = l(:files_label)
      setting.documents_label = l(:documents_label)
      setting.subversion_label = l(:subversion_label)

webdav_settings_controller.rb


        setting.files_label = params[:setting][:files_label].empty? ? l(:files_label) : params[:setting][:files_label]
        setting.documents_label = params[:setting][:documents_label].empty? ? l(:documents_label) : params[:setting][:documents_label]
        setting.subversion_label = params[:setting][:subversion_label].empty? ? l(:subversion_label) : params[:setting][:subversion_label]

en.yml

  ...
  files_label: "files" 
  documents_label: "documents" 
  subversion_label: "repository" 

de.yml

  ...
  files_label: "Dateien" 
  documents_label: "Dokumente" 
  subversion_label: "Repository" 

RE: Webdav plugin - Added by Terence Mill over 13 years ago

I am experiencing a new link on login mask of redmine since i installed the http auth plugin.

The link is named "via HTTP-Authentifizierung" in german, in think in eglish in would be "via HTTP-Authentification". I only want HTTP-Authentification fpr /webdav subfolder but not for whole redmine. How can i disable that - i want to mimimize potential security flaws . How does redmine Authentification work compared to the HTTP-Authentification?

RE: Webdav plugin - Added by Raymond Shieh over 13 years ago

Hi All

I have setting redmine-1.1.0 on ubuntu-10.04 i386 server with Apache2 and Passenger.
And follow installation steps as below(Only skip subversion related installation):
  • HTTP Authentication plugin: 0.3.0-dev
  • WebDav plugin WebDav plugin: 0.2.1

But it always return empty folder after auth via webdav.

Configuration:

PerlLoadModule Apache::Redmine
<Directory /var/www/redmine110>
    RailsEnv production
    RailsBaseURI /redmine110
    PassengerResolveSymlinksInDocumentRoot on
</Directory>

PerlLoadModule Apache::Authn::RedmineAdvanced
<Location /redmine110/webdav>
AuthType Basic
AuthName REDMINE
Require valid-user
PerlAccessHandler Apache::Authn::RedmineAdvanced::access_handler
PerlAuthenHandler Apache::Authn::RedmineAdvanced::authen_handler
RedmineDSN  "DBI:mysql:database=redmine110;host=127.0.0.1;port=3306" 
RedmineDbUser "redmine" 
RedmineDbPass "111111" 
RedmineAuthenticationOnly “On”
Order allow,deny
Allow from All
Satisfy Any
</Location>

Logs:

Processing WebdavController#rootwebdav (for xxx.xxx.xxx.xxx at 2011-01-19 09:44:29) [PROPFIND]
  Parameters: {"action"=>"rootwebdav", "controller"=>"webdav"}
Completed in 6ms (View: 0, DB: 1) | 207 Multi-Status [http://xxx.xxx.xxx.xxx/redmine110/webdav]

Processing WebdavController#rootwebdav (for xxx.xxx.xxx.xxx at 2011-01-19 09:44:31) [PROPFIND]
  Parameters: {"action"=>"rootwebdav", "controller"=>"webdav", "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, "resourcetype"=>nil, "defaultdocument"=>nil, "iscollection"=>nil, 
"parentname"=>nil}, "xmlns:a"=>"DAV:", "xmlns:b"=>"urn:schemas-microsoft-com:datatypes"}}
Completed in 6ms (View: 0, DB: 0) | 207 Multi-Status [http://xxx.xxx.xxx.xxx/redmine110/webdav]

Please help~~ :(

RE: Webdav plugin - Added by Arnaud Martel over 13 years ago

This may be a stupid question but have you activated and configured the webdav module in, at least, one project?

Kind regards,
Arnaud

RE: Webdav plugin - Added by Raymond Shieh over 13 years ago

Arnaud Martel wrote:

This may be a stupid question but have you activated and configured the webdav module in, at least, one project?

Kind regards,
Arnaud

It only works with enable Anonymous roles to "Use WEBDAV", does it correct?
Needs other settings to make the webdav work with Redmine project based auth?
Thanks!

RE: Webdav plugin - Added by Arnaud Martel over 13 years ago

I didn't test anonymous access with WebDav plugin but it should work. I usually configure permissions as follow:
  • Manager: "Manage WEBDAV" + "Use WEBDAV"
  • Contributor: "Use WEBDAV"
Next, you have to go in your project's settings then:
  • In the modules tab, check WEBDAV module and click Save
  • In the WEBDAV tab, make the appropriate changes depending what files you want to publish over WEBDAV and how, then click Save

After that, using your webdav client should be OK (you should see a directory for each project where webdav module is activated)

Kind regards,
Arnaud

RE: Webdav plugin - Added by Raymond Shieh over 13 years ago

Arnaud Martel wrote:

I didn't test anonymous access with WebDav plugin but it should work. I usually configure permissions as follow:
  • Manager: "Manage WEBDAV" + "Use WEBDAV"
  • Contributor: "Use WEBDAV"
Next, you have to go in your project's settings then:
  • In the modules tab, check WEBDAV module and click Save
  • In the WEBDAV tab, make the appropriate changes depending what files you want to publish over WEBDAV and how, then click Save

After that, using your webdav client should be OK (you should see a directory for each project where webdav module is activated)

Kind regards,
Arnaud

Dear Arnaud

Thanks for your patient with writing detail steps about permission configuration! :)
And ~ "YES", I have made those settings enabled/changed and saved as above.

So, there must be another missed steps!! That makes WEBDAV return empty folder to my webdav client if Anonymous user were disabled to "Use WEBDAV".
(While Anonymous were enabled to "USE WEBDAV", anyone can access WEBDAV without Auth. That was not what I am looking for.)

Please provide more advices or steps to resolve it!

BTW, there have another problem/question if changed project from "Public" to "Private"(uncheck
"Public" flag in Project:Settings:Information tab then click Save):

Processing WebdavController#rootwebdav (for xxx.xxx.xxx.xxx at 2011-01-20 19:09:36) [OPTIONS]
  Parameters: {"action"=>"rootwebdav", "controller"=>"webdav"}
Completed in 2ms (View: 0, DB: 0) | 200 OK [http://xxx.xxx.xxx.xxx/redmine110/webdav]

Processing WebdavController#rootwebdav (for xxx.xxx.xxx.xxx at 2011-01-20 19:09:36) [PROPFIND]
  Parameters: {"action"=>"rootwebdav", "controller"=>"webdav"}

NoMethodError (undefined method `created_on' for nil:NilClass):
  /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

Rendering /home/netuser/workspace/redmine-1.1.0/public/500.html (500 Internal Server Error)

Regards,
Raymond

RE: Webdav plugin - Added by Arnaud Martel over 13 years ago

Hi Raymond,

OK. I misunderstood your problem.
There may be an error in your apache configuration:

<Location /redmine110/webdav>
AuthType Basic
AuthName REDMINE
Require valid-user
PerlAccessHandler Apache::Authn::RedmineAdvanced::access_handler
PerlAuthenHandler Apache::Authn::RedmineAdvanced::authen_handler
RedmineDSN  "DBI:mysql:database=redmine110;host=127.0.0.1;port=3306" 
RedmineDbUser "redmine" 
RedmineDbPass "111111" 
RedmineAuthenticationOnly “On”
Order allow,deny
Allow from All
Satisfy Any
</Location>

You should change the line
  • Allow from All (which means "access is allowed for a valid user OR from any host, without authentication")
with:
  • Allow from 127.0.0.1 (which means "access is allowed for a valid user OR from localhost only, without authentication")

This way, authentication informations will be used by the plugin. Let me know if it solves your problem...

Kind regards,
Arnaud

(26-50/90)